Forum Documentation Showcase Pricing Learn more

[New Feature] Grouping and Aggregating Data


#21

@fayewatson @dan1 bug is fixed – thanks again for reporting it!


#22

This is great news, I have been waiting for this one.

Thanks guys.:ok_hand:


#23

Amazing!
Long waited feature is Live!
Grats!


#24

Loving it!!


#25

Awesome guys, thanks! Just a suggestion, if I may, to make the thread title more general as users might think it’s only for using with charts whereas it could be very helpful in some cases for repeating group data sources, or for doing certain calculations etc. Super helpful! :slight_smile:

Levon Terteryan
Founder @ Zeroqode & Bubblewits

let’s stay in touch on twitter!

zeroqode-for-web-160x120

Bubble Templates
Bubble Plugins
Bubble Courses
Convert Web to iOS & Android
No-code Development Services


#26

Great. Thanks !

Most of the time, when the agregartion is by Date, the starting date will be the first date in time. So here my idea @josh, offering dropdown options :

  • First date in time (when selected, we don’t have to write down another expression)
  • Personnalized (when selected, the input shows up)

#27

and the same for Ending Date :
image


#28

Amazing


#29

I’ve dreamt of this day. Thanks so much guys - amazingly powerful and saves all sorts of painful database workarounds (creating calendar days etc)…


#30

So happy about this update ! Thanks a lot


#31

In the “Type of data” dropdown I don’t have a “Grouping” option and I also don’t have the “'s count” option in the Value expression field. Seems I’m missing something obvious here…? :flushed: Also checked for a new Bubble release, but seems I’m on the latest version already.


#32

@gxjansen Add “grouped by” after your search expression. Once you do that, the Type of data will change to Grouping. It’s not one you can select from the start.

When you add an Aggregation for “count”, then that will become available as well.


#33

found it, thx!


#34

The example from @josh will show the total users per day that have been created on that specific day, so the line will go up-and-down. How do I create an aggregate chart that shows the total registered users on that day (so including all the previous days)? I thought this would be by replacing “count” with “sum”, but that forces you to pick a number field in the user data type and that’s not what this is supposed to do…


#35

Ok, this is a GREAT START! but why only in charts??? When can we use it as a constraint as you would in an SQL Query??


#36

It’s actually not limited to charts, can be used wherever you can do a search.


#37

Oh. I’m not seeing that.


#38

It is a modifier after you do the search, similar to :filtered, there is now :group by


#39

Got ya! I retract my previous comment! THIS IS AWESOME!


#40

@josh

I´m really excited about this feature, however I think I´ve found some bugs:

  1. Inspector doesn´t show Current Cell´s Grouping. While using Grouping in a Repeating Group, I wanted to check the grouping of a particular text field, however the inspector shows the Grouping as blank, which makes it hard when doing troubleshooting and trying to figure out what the Grouping is doing.

image

  1. I´ve had some random freezing and crashing with Chrome. I added a RG that used grouping and when I refreshed my preview page, it froze and Chrome asked me to wait or exit. When this happens, my Editor also freezes. If I close those two sessions (Preview and Editor), then go into the Editor again and delete the RG using the grouping, everything´s back to normal and no more crashes.

  2. When you change the value of a record that is being used as the Group By in a RG, another line is created for that Grouping even though it should´ve been rolled into the already existing one. Let me explain.

For example I have a data type called Sales. Each Sale has a text field called Micromarket (Micromercado in my screenshot). If I group by Micromarket and then go and change that field´s value in the database for a particular Sale, the RG then shows another line for the Micromarket, but it should´ve aggregated the sale into the already existing Micromarket, not create a new one.

Refreshing the page doesn´t solve this. However, deleting the RG and setting it up again does fix the issue.

If I change a value used as an Aggregation, the RG refreshes as expected so there´s no issues here.