# 📊 Bar Charts

**URL:** <https://community.glideapps.com/t/bar-charts/3631>\
**Category:** General\
**Created:** [January 15, 2020, 9:29pm UTC](https://community.glideapps.com/t/bar-charts/3631 "2020-01-15T21:29:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [January 15, 2020, 9:29pm UTC](https://community.glideapps.com/t/bar-charts/3631/1 "2020-01-15T21:29:55Z")

</div>

📊 Bar Charts Now you can display a bar chart that updates as users make changes in your app. Reply with a screenshot if you add one to your app!

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/7/76c334b46609f652637c563e1422ad55ea7ee174.jpeg)

---

<div class="post-metadata">

**Author:** ![gila](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gila/32/2961_2.png) [@gila](https://community.glideapps.com/u/gila)\
**Post date:** [February 2, 2020, 1:46am UTC](https://community.glideapps.com/t/bar-charts/3631/2 "2020-02-02T01:46:00Z")

</div>

Hi @david, I added a series of bar charts to my app based on user-submitted form data (user logs their daily condition).

The charts go blank after about 35-40 submissions. If I go in and delete a few of the submissions to get it back down to around 30 submissions, the bars gradually reappear - first only partially (see screenshot) and then fully.

Is this a limitation to the chart component? Obviously I don’t expect the chart to show 1000 tiny bars, but maybe grouping by 5, 10 etc as the number increases would be possible, or a line chart for large numbers?

Or the ability to be able to set a limit on the number of bars to show in a chart (sorted by date for example)?

 ![Screen Shot 2020-02-02 at 12.12.49 pm](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/b/b060ca9c2c08ac424b99ffdb44dc832a022cead9.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 2, 2020, 2:37am UTC](https://community.glideapps.com/t/bar-charts/3631/3 "2020-02-02T02:37:07Z")

</div>

Maybe you could run a query or some other formula in a new sheet to load only the last 30 records. Then use the sheet for your charts.

---

<div class="post-metadata">

**Author:** ![gila](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gila/32/2961_2.png) [@gila](https://community.glideapps.com/u/gila)\
**Post date:** [February 2, 2020, 2:45am UTC](https://community.glideapps.com/t/bar-charts/3631/4 "2020-02-02T02:45:20Z")

</div>

Thanks @Jeff_Hager

The sheet holds the submissions for multiple users though (this is an app for an organisation where there will be dozens of users submitting each day).

So would it be possible to have a formula that pulled the last 30 submissions for each and every user? Not just the last 30 submissions of the entire group of users in general.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 7, 2020, 7:17am UTC](https://community.glideapps.com/t/bar-charts/3631/5 "2020-02-07T07:17:59Z")

</div>

This is an interesting formula. Seems to keep a running count unique to a specific column value. I think this could work if you use a query to load your results into another sheet in reverse date order, then create a new column that uses formula. This will number each row, grouped by user. The most recent dates will have lower numbers. This way you could apply a filter on the numbered column where the number is less than or equal to 30.

`=ARRAYFORMULA(IF(LEN(A2:A)=0, "", IF(A2:A=A2:A,COUNTIFS(A2:A,A2:A,ROW(A2:A),"<="&ROW(A2:A)),)))`

Originally found here, but modified slightly. Should be able to place in the second row and replace all A2:A columns with the column of your user name (or email):

> **[Running Count in Google Sheets - Formula Examples](https://infoinspired.com/google-docs/spreadsheet/running-count-in-google-sheets/)**
>
> I have different formula options for running count calculations in Google Sheets. To perform running count I have non-array as well as array formulas.
