We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Dynamic Date Range: Rolling 12 Months - Prev Month

ansh09
6 - Meteoroid

I'm trying to build a dynamic date range to filter on a rolling 12 months - end of the previous month.

 

For example: Today is 2/06/2025, so I want my date filter to show 1/1/2025 - 1/31/2025.

 

And everytime when ever i run my workflow on a monthly basis it should automatically takes the "Start" and "End" Date of the previous month, irrespective of the number of days in a month (30,31 or 28). 

 

Thanks for your help. 

5 REPLIES 5
PangHC
13 - Pulsar

Screenshot 2025-02-06 185550.png

ansh09
6 - Meteoroid

after applying this it is giving me an error saying " the formula "DUE DATE" resulted in a integer but the field is a Date/time 

 

how to resolve? 

davidskaife
14 - Magnetar

Hi @ansh09 

 

You're applying a logical calculation onto a Date field, if you create a new field instead that should fix it

ansh09
6 - Meteoroid

I did that
but i am not getting the required output , I guess i would need to use it in Filter tool so that only required rows should come up.

davidskaife
14 - Magnetar

If you're using that formula to filter then yes a Filter tool will be required, that should restrict it to just those records you need.

 

Alternatively create a new flag field using the formula, and filter on the flag.

Labels
Top Solution Authors