How to group by creator then sort by Date Interval?

So I have a datatype called Login which I used to track how long the session was. Then I was working on a dashboard where I need to do a leaderboard of each professional’s total login duration

So I did this:

However I cannot call sum on date interval, as you can see the “active_duration” field is not there, so what can I do?

Hi. Bubble’s sum function works explicitly on numbers. If you want to show duration, either you can do that within the group / Repeating group where you want the information.

Or you can create a new field within the data type ‘Logins’ for duration. You can then update it whenever the dates are updated. This way you will be able to use the aggregation “sum”.

Hope this helps.

Hi Animisha,
This does work to an extend, but the moment I try to group the values by creator, the same issue will occure, the solution would be to just make a do a search for in every collumn, but then I ran into the issue of not being able to sort them by total active duration. Do you have any suggestions for this?

for context I have done similar things to this before and used the LIST SHIFT PRO plugin to achieve this.


In that case you can try this:

Login datatype might look something like this:
Date ranges (date range)
Creator (user)
Duration (number)

1 Like

perfect, exactly what I needed!

This topic was automatically closed after 70 days. New replies are no longer allowed.