# Restricting Number of rows considered in a bar chart

**URL:** <https://community.glideapps.com/t/restricting-number-of-rows-considered-in-a-bar-chart/17038>\
**Category:** Feature Requests\
**Created:** [October 12, 2020, 8:59am UTC](https://community.glideapps.com/t/restricting-number-of-rows-considered-in-a-bar-chart/17038 "2020-10-12T08:59:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akash\_Deshpande](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/akash_deshpande/32/15104_2.png) [@Akash\_Deshpande](https://community.glideapps.com/u/Akash_Deshpande)\
**Post date:** [October 12, 2020, 8:59am UTC](https://community.glideapps.com/t/restricting-number-of-rows-considered-in-a-bar-chart/17038/1 "2020-10-12T08:59:34Z")

</div>

Hello Everyone,

This is Akash. I have an app on Glide where in I daily add lead numbers coming from different sources to a section and reflect them in a bar chart. The issue I am facing is that the bar chart is reflecting numbers from every row I add and not limiting it to say 5 or 7, making it look very congested and difficult for users to understand. I wish I could restrict it! to few recent rows. Can someone please suggest or help in this.

[image|370x280](https://community.glideapps.com/uploads/short-url/cZYKWaculuzS7IFlZBluRo0rlK3.png)

Best,  
Akash

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 12, 2020, 9:15am UTC](https://community.glideapps.com/t/restricting-number-of-rows-considered-in-a-bar-chart/17038/2 "2020-10-12T09:15:12Z")

</div>

You can do something like this:

- Create a “row value” column in Sheet. Put this in the first cell of your next column.

- In Glide Editor, create a rollup column, use that rollup on the row value above and take the max.

Let’s say you want to display the last 5 rows only. Create a math column - let’s say “Bennchmark” with the formula:

```
Max - 4

```

With Max pointing to the max rollup above.

Display any rows with row value greater than or equal to “Benchmark”. We only deduct 4 because we take into account the last item as well.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 12, 2020, 9:16am UTC](https://community.glideapps.com/t/restricting-number-of-rows-considered-in-a-bar-chart/17038/3 "2020-10-12T09:16:19Z")

</div>

Also, this is not a bug so while you can still use my recommendation, I have change the post to a “Feature request”.

You can submit a request on here.

> **[Feature Requests](https://features.staging.glideapp.io/)**
>
> Feature requests for Glide Apps

---

<div class="post-metadata">

**Author:** ![Akash\_Deshpande](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/akash_deshpande/32/15104_2.png) [@Akash\_Deshpande](https://community.glideapps.com/u/Akash_Deshpande)\
**Post date:** [October 14, 2020, 8:03am UTC](https://community.glideapps.com/t/restricting-number-of-rows-considered-in-a-bar-chart/17038/4 "2020-10-14T08:03:10Z")

</div>

Thank you @ThinhDinh. Will try the suggestion shared by you. I saw a similar feature request already existing and voted for it. Hope to see this feature soon 🙂
