Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
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
Idyllic_Data_Geek
8 - Asteroid

working days in last month

atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

You can filter out weekends by using a filter like below.

 

DateTimeFormat([Dates List],"%a") not in ("Sat","Sun")

 

Workflow:

atcodedog05_0-1630506373264.png

 

Hope this helps : )

Idyllic_Data_Geek
8 - Asteroid

awesome 🙂 Now is there a way where I can identify current month based on today's date? then

1) identify the previous month

2) Identify all the week days(dates) in that month?

 

Thanks a bunch in advance

atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

Can you provide the expected output so that I can work towards it.

Idyllic_Data_Geek
8 - Asteroid

If I run this workflow in September then I only want to account for working days in August. I do not want to include anything from September or July

Idyllic_Data_Geek_0-1630512913739.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1630515588128.png

 

Hope this helps : )

 

Idyllic_Data_Geek
8 - Asteroid

Thank you. I tool a slightly diff approach by calculating the month of today's date. Then I subtracted the number...changed the data type and set the logic/filter to be today_month - report_month = 1

 

Idyllic_Data_Geek_0-1630517652305.png

 

atcodedog05
22 - Nova
22 - Nova

@Idyllic_Data_Geek 

 

Awesome!

 

Happy to help : )

Cheers and have a nice day!

Idyllic_Data_Geek
8 - Asteroid

I have another question related to same workflow.  I used DateTimeFormat(DateTimeToday(),"%B") to get month of september. What is the easiest way of getting august by doing sept-1? TIA

Idyllic_Data_Geek
8 - Asteroid

How can I use today's date to derive previous month name and year..sth like AUG-21

Labels
Top Solution Authors