[New Feature] Grouping and Aggregating Data

Hi all,

We’ve heard from many of you that you’d like an efficient way of displaying your app’s data in a chart or table. For instance, maybe you’d like to be able to show a graph of new user signups by month, or show a table of total sales by region and account.

We now have a tool for supporting this kind of operation. It’s called “:group by”, and you apply it on top of a search or other list of data items in order to group and summarize the list.

The basic concept is that you define one or more groupings, which specify how we group the data (by creation date? by category? by owner?) and then one or more aggregations, which specify what you want to know about it (how many items there are, or the sum or average of a number field, etc.)

The output of the group by operation is a new, shorter list, that contains items that represent the resulting groups. Each group has the fields you grouped on, and the aggregations we calculated describing the group. You can then use this new list as the data to display in a chart element or a repeating group element.

For more details on exactly how groupings and aggregations work, please see the description of the new feature in the reference: Introduction - Bubble Docs

78 Likes

Where do i get this chart element?

1 Like

Amazing, Finally and just in time for my new project.

Thanks guys

1 Like

The one in my screenshot is the Bubble-team-built “Chart Element” plugin, but you should be able to use this new feature with any Bubble chart plugin: there’s a bunch of great community-created charts as well. Just go to “Plugins” -> “Add plugin” and search for charts

1 Like

Why not also have a “group by” option on RG’s?

3 Likes

Is this only for the new bubble version?

Works flawlessly. Very well done guys. Thanks.

@cheskiefisch, have you tried it? It works on searches so yes, you can use it on a RG.

1 Like

Oh my god… #fangirling over this.

Very, very cool. Nice work! :ok_hand:

12 Likes

This is awesome! Should make data segregation a breeze :slight_smile:

Very cool feature! This should help quite a bit when working with Google Charts. Looking forward to using it!

David
AirDev - Custom Software for Everyone

Thank You!!!

Clutch!

So great to see this. Thanks guys.

Would this be a good time to ask for the ability to sort by these wonderful new groups? :slight_smile:

–Ken

1 Like

@josh this is an awesome addition to the platform. Really enjoying it!

Question: when I use the data source: Do a search for a User, it seems that the chart doesn’t render. However, when I use other data types, a chart renders. (Note: group by User where User is a thing on another table works. Just not when it is used for the initial data source).

Perhaps I’m missing something. Or is it not possible to use User as a data source?

Grouping a list of users should work, so you might be seeing a bug (it’s brand new code, so there are probably still a few kinks to work out…). If you can put together a demo page that shows the issue, and email it to support@bubble.is, I’d appreciate it

Figured that may be the case, will send in the next ~30 min.

Actually @fayewatson beat you to it :slight_smile: . I guess it’s a general problem with the grouping Users. Investigating now, hopefully will have a fix this evening

1 Like

Sounds good, if you have any trouble replicating, ping me and I’ll put a video together.

2 Likes

@dan1 Ah, I just saw these posts! I was trying to set up exactly what you described. :slight_smile:

Thank you so much for the help, @josh!

2 Likes

@josh I LOVE YOU Right Now!

1 Like