Question about filtering by date ranges

I have a table with record by dates, I want to filter the result by date interval, for example showing the interval from the 21st of the month to the 20th of the following month.
I have a slice created with the following filter: MONTH ([DATE]) = MONTH (TODAY ()). It only shows me the data for the current month, but not for the interval I want to show.
Can you help me.

One option of expression could be like below.

OR(

AND(DAY([Date])>=21, MONTH([Date])=MONTH(TODAY())),

AND(DAY([Date])<21, MONTH([Date])=MONTH(EOMONTH(TODAY(),1)))

)

On every 1st of month the expression will move to next cycle.

So in all of August month , it will filter dates from 21 August to 20th September. In all of September 2020, it will filter dates from 21st Septmber to 20th October and so on.

Edit: If you wish the start date to vary , you could use a user settable field to set start date in place of 21 above.

1 Like

I have inserted the expression in the slice, but it has not shown me data which until today I have records.
como se hace esto? : Edit: If you wish the start date to vary , you could use a user settable field to set start date in place of 21 above.

Could you please elaborate what you mean by this? Does your data have dates in the month of August 2020 and September 2020. Then only it will work.

In general it is done similarly as per below mentioned sample app or user settings.

https://www.appsheet.com/samples/Allow-the-user-to-filter-a-view-based-on-a-form?appGuidString=91266cff-e843-46b8-a42b-3d85afedb37f

2 Likes