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

I'm watching the video. One quick question among many others that will follow. What am I converting to macro? the genrate rows functionality or the original workflow that I have?

atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

You will convert the original workflow to macro. And you will changing date using the control parameter this way it runs the workflow for each required date.

 

Hope this helps : )

Idyllic_Data_Geek
8 - Asteroid

And how about the generate rows functionality? how will I bring that in the picture? Does it need to be converted to macro as well?

 

atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

Your workflow will be converted to macro like below. Where date will be replaced on each batch run. Here 2021-08-31 is the date value i will be switching.

 

atcodedog05_0-1630348779313.png

 

Your block with generate rows tool which generates list of dates will the main workflow. It passed list of dates which needs to changes for each batch.

 

atcodedog05_1-1630348897727.png

 

This way you will be running your workflow once for each date.

 

Hope this helps : )

Idyllic_Data_Geek
8 - Asteroid

It's very helpful. When I try to convert my workflow to Macro then this is what it looks like. Any idea what I'm missing? Thanks for your help

Idyllic_Data_Geek_0-1630353736896.png

 

Idyllic_Data_Geek
8 - Asteroid

The previous screenshot I saved it as macro and then brought it into the below view,

Idyllic_Data_Geek_0-1630354783961.png

 

Idyllic_Data_Geek
8 - Asteroid

Hello. Hope that all is well with you today. QQ. your macro has one input where as my macro has 2 inputs as shown in my previous screen shot. can you please help me configure it?

 

Idyllic_Data_Geek
8 - Asteroid

Thanks Dan

Idyllic_Data_Geek
8 - Asteroid

Thanks for your help so far. I did accept your post as solution 🙂 I have another question on generate rows functionality. I'm using the todaydate() to derive the dates for last 30 days. The requirement actually is to pull in the working dates(excluding the weekends) from previous month and then pass it into the macro that I created with your help. So if some one runs the report on Sept5th or 4th then it should identify all the working days of August and feed it into the macro. How can I achieve this by only changing the below?

Idyllic_Data_Geek_0-1630505708834.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @Idyllic_Data_Geek 

 

is the requirement

 

1. Last 30 working days?

or

2. Working days in last 30 days1?

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels