Making a chart for the past month

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
For example in this image I want to keep August and September but I dont want January and June

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

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.

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?

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.

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).

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

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

Actually client changed his mind he told me he just wants the ā€œpast monthā€ chart to just show the past 30 days

So it shows days instead of months?

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.

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.

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

I did here is how I filtered it


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

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

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


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?

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.

1 Like

Alright thank you so much

1 Like

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