How to sort repeating groups that use grouped by:

Hello everyone!

Has anyone a solution to sort a repeating group that’s using :grouped by in a way other than alphabetical?

I have now created an automatic leaderboard that updates every hour. To show :last item of a person’s leaderboard, GROUPED BY: is used. This means you only see the leaderboard alphabetically and not in descending order of their achievements. How can I fix this?

By the way, I am using the new Bubble table element for this.

You can add an aggregation then sort by that aggregation

How does the sort work by aggregation?

This is the table right now:

What do you want to group and display exactly?

Here is an example of how to use grouping and aggregations.

I have “Cards” in my database. (not very important what it is)

I want to make a table that will GROUP cards based on the day they were created. And for each day I want to AGGREGATE the group of cards and count how many was created.

Another representation of what is done :

Card A : created Monday
Card B : created Monday
Card C : created Monday
Card D : Created Tuesday
Card E : Created Thursday

First you GROUP by “Date” (you can also group by other type of fields like text or number)

So you get a table :
Monday : A / B / C
Tuesday : D
Wednesday : empty (if you tick the option “Do not skip empty groups”)
Thursday : E

And then you AGGREGATE. Basicaly you tell Bubble “For each GROUP, I want as a result the Count of how many things they are”

And you get a table :
Monday : 3
Tuesday : 1
Wednesday : 0 (if you tick the option “Do not skip empty groups”)
Thursday : 1

Note : as an output value in the dynamic fields, you’ll only see the result of the aggregations you’ll do. If you only group with no aggregation you won’t see anything there.
image

1 Like

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