# Charts - Limit to the last 7 days

**URL:** <https://community.glideapps.com/t/charts-limit-to-the-last-7-days/18101>\
**Category:** Ask for Help\
**Created:** [November 7, 2020, 12:11pm UTC](https://community.glideapps.com/t/charts-limit-to-the-last-7-days/18101 "2020-11-07T12:11:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Airbag](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/airbag/32/16159_2.png) [@Airbag](https://community.glideapps.com/u/Airbag)\
**Post date:** [November 7, 2020, 12:11pm UTC](https://community.glideapps.com/t/charts-limit-to-the-last-7-days/18101/1 "2020-11-07T12:11:04Z")

</div>

Hi there!

I would like to limit the number of days displayed in a bar chart to the last 7 days (including today).  
Does anyone know know how to play with the filters to do that please?

Many thanks!

---

<div class="post-metadata">

**Author:** ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)\
**Post date:** [November 7, 2020, 12:14pm UTC](https://community.glideapps.com/t/charts-limit-to-the-last-7-days/18101/2 "2020-11-07T12:14:29Z")

</div>

Add a math column in your data editor which calculates number of days between today and the date in your database.  
Using this column add a filter in your chart data which says no of days is less than or equal to 7

---

<div class="post-metadata">

**Author:** ![Airbag](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/airbag/32/16159_2.png) [@Airbag](https://community.glideapps.com/u/Airbag)\
**Post date:** [November 7, 2020, 12:25pm UTC](https://community.glideapps.com/t/charts-limit-to-the-last-7-days/18101/3 "2020-11-07T12:25:31Z")

</div>

Manu thanks!
