Hi !
I made an Application in which user fills a table by pressing “action buttons”. Each pressing creates a row with Action name and date creation. I would like to display in the Application the last action name and its duration.
Is it a bit more complex because I have several subjects to track at the same time. Each row contains the subject name. So it needs to find the last action of each subject.
I tried with data source but didn’t find the way to filter my table with last action of each subject.
Thanks at anyone would have an idea to help 
Nicolas
Hi @ENICOLAS, welcome to the community!
If I understand it right - this is quite hard to achieve in baserow at this time because what you essentially need here is an aggregate query which is not currently possible. There is potential still to be able to solve this through using views along side a group by setting and with a formula to work out the latest record for each subject, but I’d really need more details about your database schema in order to make a suggestion there and if it would work in your specific case.
Hi @cwinhall and thanks for your help !
If you can see my screenshots, here is the application I tried to build.
I want the user to be able to write subject name and then click on button each time an action is started. By recording starting time of each action, I would like to measure each duration (always an action in progress).
What I didn’t manage to do is to write in the highlighted zones the action in progress for each user and ideally its current duration.
This is the only table created. These rows has been written by button clicking.
Let me know if you need more information.
Thanks !
Hi @cwinhall !
Eventually, do you think the tips you mentioned would be able to solve my problem, even a little bit ?
Thanks,
Nicolas.
I think a solution like this could work:
- Create filtered views for each subject:
- Create separate views of your table filtered by each subject name (1st Subject, 2nd Subject, 3rd Subject)
- Sort each view by the “Lancement” column in descending order (newest first) - This way, the top row will always be the latest action for that subject
- Use data sources to display the latest action:
- For each highlighted zone, create a data source pointing to the corresponding filtered view
- Limit the results to 1 record (the top/most recent one) - This will give you access to display the most recent action for each subject
- Calculate duration with a formula field:
- Add a formula field to your table that calculates the duration between “Lancement” and the current time
- For actions that are completed, you could use a different field to record completion time