# Grouping Data for Bar Char

**URL:** <https://forum.bubble.io/t/grouping-data-for-bar-char/371>\
**Category:** Need help\
**Created:** [October 13, 2015, 1:05pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371 "2015-10-13T13:05:43Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![vpatel27](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vpatel27/32/222_2.png) [@vpatel27](https://forum.bubble.io/u/vpatel27)\
**Post date:** [October 13, 2015, 1:05pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/1 "2015-10-13T13:05:43Z")

</div>

Hi  
I am trying to use the Bar Chart.

I have monetary data that belongs to categories, i would like to show the sum of the categories in a bar chart.

I guess its doing a group by…if it was SQL?

Can you please guide me on how to achieve this.

I have attached a pic of what I have so far, as you can see the categories repeat rather than group.

![](https://us1.discourse-cdn.com/bubble/original/1X/841e591719572846dbba2f803403093630ffaacb.png)

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [October 13, 2015, 3:30pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/2 "2015-10-13T15:30:37Z")

</div>

Right, we don’t support this yet, but it’s on our list.

---

<div class="post-metadata">

**Author:** ![vpatel27](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vpatel27/32/222_2.png) [@vpatel27](https://forum.bubble.io/u/vpatel27)\
**Post date:** [October 13, 2015, 7:06pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/3 "2015-10-13T19:06:03Z")

</div>

Ahh ok…  
Please let me know when this is released…then I can get back to that part of the dashboard 😄

---

<div class="post-metadata">

**Author:** ![edd](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/edd/32/161_2.png) [@edd](https://forum.bubble.io/u/edd)\
**Post date:** [October 17, 2015, 3:49am UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/4 "2015-10-17T03:49:56Z")

</div>

I am new to Bubble, but in my evaluation of the features (so far so good) I had a similar need and I believe I got around it by creating a second data table (akin to your “budget by category”) and incrementing the value associated with that category dynamically whenever a new raw transaction was recorded in the primary table. So if your normal data table would accept new records like:

Household Bills | $250  
Household Bills | $30  
Household Bills | $50

… then your second data table would have a single record for “Household Bills” that with each transaction would change the value from $250 to $280 to $330.

Obviously this is not ideal compared to a simple Group By, and depending on how dynamic your data and level of aggregation required may be impractical, but for what would otherwise be simple queries it seems to do the trick for now.

---

<div class="post-metadata">

**Author:** ![vpatel27](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vpatel27/32/222_2.png) [@vpatel27](https://forum.bubble.io/u/vpatel27)\
**Post date:** [October 21, 2015, 11:16am UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/5 "2015-10-21T11:16:30Z")

</div>

Thanks Edd

I would probably end up with way to much data, think I can wait until the functionality is released…is a nice to have 😄

---

<div class="post-metadata">

**Author:** ![samuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/samuel/32/2239_2.png) [@samuel](https://forum.bubble.io/u/samuel)\
**Post date:** [May 4, 2016, 12:39pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/6 "2016-05-04T12:39:07Z")

</div>

@edd @emmanuel

Hi,

I am new to bubble . I have a similar need to list the unique Items from a table in a repeating group.

Example: if My data is

Household Bills 250  
Household Bills 100  
Electricity Bills 50  
Household Bills 200  
Electricity Bills 100  
Electricity Bills 50

Then I need a result in another table with the unique items and their sum as

Household Bills 550  
Electricity Bills 200

Can you please guide me how to do this?

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [May 4, 2016, 12:40pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/7 "2016-05-04T12:40:39Z")

</div>

You’ll have to keep the data up to date in your database as a thing, we don’t support grouping stuff for chats yet.

---

<div class="post-metadata">

**Author:** ![anatoly.chernenko](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anatoly.chernenko](https://forum.bubble.io/u/anatoly.chernenko)\
**Post date:** [October 7, 2016, 6:48pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/8 "2016-10-07T18:48:24Z")

</div>

Hi Edd, can you please elaborate on updating “group by” table? How exactly you do it? Do you have a working example?

---

<div class="post-metadata">

**Author:** ![motorhome](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/motorhome/32/4402_2.png) [@motorhome](https://forum.bubble.io/u/motorhome)\
**Post date:** [October 8, 2016, 8:41am UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/9 "2016-10-08T08:41:42Z")

</div>

HI @emmanuel Can you give us an update on when we may see this feature. I would like charts like this to be one of the main features of my app.  
BTW loving Bubble and continue to be amazed and what I have achieved knowing nothing about code - Thanks

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [October 8, 2016, 12:23pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/10 "2016-10-08T12:23:51Z")

</div>

We unfortunately don’t have a clear timeline for that yet

---

<div class="post-metadata">

**Author:** ![atroche1978](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/atroche1978/32/6477_2.png) [@atroche1978](https://forum.bubble.io/u/atroche1978)\
**Post date:** [October 8, 2016, 2:21pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/11 "2016-10-08T14:21:10Z")

</div>

This would be a great feature to have soon. The app I’m working on also uses a chart that will display data by groups.

---

<div class="post-metadata">

**Author:** ![julian1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/julian1/32/7042_2.png) [@julian1](https://forum.bubble.io/u/julian1)\
**Post date:** [December 4, 2016, 2:42pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/12 "2016-12-04T14:42:47Z")

</div>

I would also like to add that grouping of data to display in reports is essential - I am building a CRM system and would like to be able to produce a sales forecast as both a grouped report (by month, salesman etc), as well as charts.

It would also be useful to be able to contain data using more complex criteria - for example, I have a Sale Stages lookup table which has a field where the use can determine if a particular stage is to appear on their forecast - an I would like to use this as a constraint when filtering the opportunities - without having to copy the value into a field in the opportunity table (which would be terrible database design).

---

<div class="post-metadata">

**Author:** ![anatoly.chernenko](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anatoly.chernenko](https://forum.bubble.io/u/anatoly.chernenko)\
**Post date:** [January 11, 2017, 2:51pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/13 "2017-01-11T14:51:12Z")

</div>

…my 5 cents, ended up creating additional tables only for charts also, GROUP BY is much needed soon!

---

<div class="post-metadata">

**Author:** ![anatoly.chernenko](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anatoly.chernenko](https://forum.bubble.io/u/anatoly.chernenko)\
**Post date:** [May 7, 2017, 3:43pm UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/14 "2017-05-07T15:43:48Z")

</div>

any updates soon?

---

<div class="post-metadata">

**Author:** ![brad.a.farley](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/brad.a.farley/32/21139_2.png) [@brad.a.farley](https://forum.bubble.io/u/brad.a.farley)\
**Post date:** [February 20, 2018, 12:47am UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/15 "2018-02-20T00:47:46Z")

</div>

bump. Any updates to this? expanded charting functionality is sorely needed.

---

<div class="post-metadata">

**Author:** ![exception-rambler](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/exception-rambler/32/152704_2.png) [@exception-rambler](https://forum.bubble.io/u/exception-rambler)\
**Post date:** [February 20, 2018, 8:36am UTC](https://forum.bubble.io/t/grouping-data-for-bar-char/371/16 "2018-02-20T08:36:14Z")

</div>

Without paid plugin solutions the upgrade that you are waiting on here is _Data aggregations_ and _Calculated fields_. You can see these under **Ongoing** on the Bubble roadmap [here](https://bubble.io/roadmap).

The charting frameworks (ChartJS in Bubble’s case) can only render the data that is passed their way and do not inherently have the capabilities needed to aggregate / rollup data sets. So, Bubble’s approach is to build these capabilities in at source - in and around the database - rather than upgrade the elements (e.g. charts) that would use them.

With that, you should be able to achieve what you are looking for within Bubble’s own tools.

_Final thought_… if you want to go the workflow route, you can achieve the effect that you are looking for now without 3rd party support. You can add **Sum** or **Average** (or whatever rollup you need) fields to your objects, and use workflows to update these parent values each time a child value is changed. Although a touch clunky, this actually works fine - just be mighty careful to not let the parent value fall out of sync with the child values… because there is no coming back from there!
