# Making a chart for the past month

**URL:** <https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428>\
**Category:** Ask for Help\
**Created:** [September 16, 2024, 11:57pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428 "2024-09-16T23:57:57Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 16, 2024, 11:57pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/1 "2024-09-16T23:57:57Z")

</div>

Currently I am making a bar graph for the past month but I end up getting the current month and every other month before that I want to be able to get the current month and the one before that.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/0/8077ff668f6bd0057b65ecbca61f1c244fb4d6da.png)  
For example in this image I want to keep August and September but I dont want January and June

---

<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:** [September 17, 2024, 12:12am UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/2 "2024-09-17T00:12:22Z")

</div>

How do you get the months in your database? Is it in bare text form or do you have a timestamp?

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 17, 2024, 12:24am UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/3 "2024-09-17T00:24:52Z")

</div>

It’s bare text form the way I did it was I did the math column `Weekday(Date)-1` then I sent that into a single value column displaying the month each row.

---

<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:** [September 17, 2024, 12:27am UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/4 "2024-09-17T00:27:21Z")

</div>

Wouldn’t you have to factor in the year there? Say if you have 2 years’ worth of data wouldn’t August 2023 and August 2024 clash with each other?

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 17, 2024, 12:32am UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/5 "2024-09-17T00:32:38Z")

</div>

Yes, I have 3 charts one for the past 7 days one that shows data for the last month and one for the past year. The issue here is whenever I enter data from June and the current month is September it will show June in the ‘past month’ chart I don’t want that the only 2 months I want the chart to show is the current month and the one before that one which would be August if we’re talking about today’s current month.

---

<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:** [September 17, 2024, 2:16pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/6 "2024-09-17T14:16:46Z")

</div>

You can have a math column to calculate the last month’s numerical form in your users table.

`YEAR(N-DAY(N)+15-30)*10^2+MONTH(N-DAY(N)+15-30)`

Then add a math column in your table where you want to use as your chart’s source.

`YEAR(N)*10^2+MONTH(N)`

Filter your “past month” chart by the second column above’s value being greater than or equal to the first column’s value (so only last month and this month).

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 17, 2024, 9:32pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/7 "2024-09-17T21:32:22Z")

</div>

I don’t think it worked because it still shows the other months but I used the “In-app filter” which was my best choice here I don’t think it’s possible from there the user has to manually change it which sucks but I’m limited to what I have here’s what I put if I’m incorrect let me know.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/2/82ce399d12a30ee8c168d8a51b6f881d04a05760.png)

---

<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:** [September 17, 2024, 11:42pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/8 "2024-09-17T23:42:36Z")

</div>

Can you show me the values you have from those columns, and your chart configurations?

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 18, 2024, 4:43pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/9 "2024-09-18T16:43:03Z")

</div>

Actually client changed his mind he told me he just wants the “past month” chart to just show the past 30 days

---

<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:** [September 18, 2024, 10:38pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/10 "2024-09-18T22:38:20Z")

</div>

So it shows days instead of months?

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 19, 2024, 4:06am UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/11 "2024-09-19T04:06:04Z")

</div>

It seems like he does but the bad news is that it’ll look too cluttered on the x-axis is there a way around this? Sorry if I’m asking for too much I know this is a no code platform and certain things are limited.

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 19, 2024, 5:17am UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/12 "2024-09-19T05:17:35Z")

</div>

So good news I was able to filter the data out for anything before the date of the task being created but the bad news is that I can’t get the graph to display just the 30 days. Instead it shows me everything from the past of all time. For example let’s say I have data from july 1st and it’s currently september 18th it will show me the data of July but I don’t want that I only want data from September 18th - 30 days but it won’t show that.

---

<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:** [September 19, 2024, 2:12pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/13 "2024-09-19T14:12:46Z")

</div>

Have you tried adding a column in your Users table to calculate `Now-30` and then filter your records based on that?

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 19, 2024, 4:41pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/14 "2024-09-19T16:41:13Z")

</div>

I did here is how I filtered it

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/c/5c64e78eddb09f68eda689694cdda9bc7f82c169.png)  
the formula for 30Days is `Now - 30` the problem here is I’m getting data from last year “9/13/2023” I don’t want that unless I’m filtering it wrong let me know

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 19, 2024, 4:56pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/15 "2024-09-19T16:56:29Z")

</div>

I also have data for 9/16, 9/17, 9/18 and those aren’t being displayed either

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 19, 2024, 5:09pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/16 "2024-09-19T17:09:37Z")

</div>

After a bit of using my brain I think I finally got it now it’s showing the date past the 30 days

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/9/d9868cc85c566f0e52760af57506b2afdf3148a5.png)  
I filtered it but I’m curious to know if 30 days pass and new dates get populated will the chart update to the next 30 days?

---

<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:** [September 19, 2024, 6:37pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/17 "2024-09-19T18:37:56Z")

</div>

Your math column to calculate now-30 will always continually update, so it will be a rolling 30 days that changes each day, so your filters should continually update.

---

<div class="post-metadata">

**Author:** ![carlos\_villegas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_villegas/32/79714_2.png) [@carlos\_villegas](https://community.glideapps.com/u/carlos_villegas)\
**Post date:** [September 19, 2024, 6:41pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/18 "2024-09-19T18:41:41Z")

</div>

Alright thank you so much

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [September 26, 2024, 6:42pm UTC](https://community.glideapps.com/t/making-a-chart-for-the-past-month/76428/19 "2024-09-26T18:42:15Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
