Find date with maximum transaction count

In my Bbble app, I have stored purchase entries for different dates.

I want to display the date that had the maximum transactions.

I also want to handle the cases when during a date range there is only one transaction per day. In that case, it should show the latest transaction date.

Additionally, if there are no transactions in that date range, it should show black or a dash.

You can use the group by operator…do a search for your Purchase entries then use the :grouped by operator - Bubble manual does good job explaining how to use the grouped by operator

Hi, I am trying the same approach where i have done a search for all purchases, grouped by date with an interval of 1 day and then aggerated it by count.

But i am not able to understand how can i display the purchase date with highest aggregation count.

Reference the rg values in a dynamic expression, then sort it by count, then take the first item and display the date.

1 Like

The problem with this is that timing of purchase entry is different even though they were made on the same day and that is why in grouping and aggregation they are counted as unique groups.

So when I sort by count and show the first item’s date, it is not displaying the desired date.

No. The grouping is done by Date with the type of grouping being day, with interval of 1, which means from 12AM to 11:59PM on the same day everything gets grouped together.

Have you tried what I suggested or just spitballing that you think it will not work?

Pardon me. I had mistakenly set the grouping interval to “exact” instead of using a 1-day interval, resulting in unique groups for different dates and times. It worked when I adjusted the grouping to 1 day intervals. Thank you so much for your help.

I’ve noticed you’re very active in the community, and I’ve just begun learning Bubble, so please bear with me as I navigate through my learning process and ask what might seem like silly questions.

No worries, I’m glad you got it sorted out. There are always going to be times we make a slight change and forget, or do not think it may have the impact it does. Originally you showed in your screen shot you had the correct setup on the grouping, so I assumed it would not have changed.

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