Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Decrementing the date field by 1 for 31 days and passing it to the workflow

Idyllic_Data_Geek
8 - Asteroid

I have a requirement to execute the daily workflow for last month. it should do it iteratively for each day and aggregate the data in the final output file. It should pass one date and let the workflow execute and then reduce the date by 1 and repeat. Can I use any calculation instead of using a macro?

Thanks in advance for your valuable time!

32 REPLIES 32
atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1630566058775.png

 

Hope this helps : )

 

Idyllic_Data_Geek
8 - Asteroid

Thank you. Why are you using generate rows? The calc looks slightly complicated for my simple req. datetimetoday() should be used to give me previous month name and year.

atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

You are right use formula like below

 

DateTimeFormat(DateTimeAdd(DateTimeToday(),-1,"months"),"%b-%y")

 

Workflow:

atcodedog05_0-1630588402500.png

 

Hope this helps : )

 

Labels
Top Solution Authors