Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Iterative Macro Assistance

Andrew
5 - Atom

Hello,

 

I have a sales routine that needs to be processed for each sales category, with the output being written to a worksheet tab in the Excel workbook. The tab needs to be named with the category name.

 

I've set up the flow, with a filter on category.  I'd like to eliminate the filter and have the process run for each category.  There may be more categories in subsequent periods so the iteration is not a fixed number.  

 

I watched the tutorials and read other forums, but I can't seem to accomplish the task.

 

I've attached the workflow.  A macro solution would be much appreciated.

 

Thank you,

Andrew

 

4 REPLIES 4
AngelosPachis
16 - Nebula

Hi @Andrew ,

 

As you want to run your workflow for each product category, a batch macro might be an easier way to do that compared to an iterative macro. Your batch macro will run your workflow for each record that feeds into the reversed questionmark

 

AngelosPachis_0-1645051874640.png

 

As you can see above, I've used a summarize tool to group on the field category, so now my batch macro will run for each one of those three values. Those values will be fed to a control parameter, which is that funny looking tool that look like a cog. That will dynamically update your filter each time this workflow runs.

 

AngelosPachis_1-1645051947003.png

So first time it will run for furniture, then for office supplies and finally for technology and all results will be stacked together

AngelosPachis_2-1645052045493.png

 

Hope that helps

 

Qiu
20 - Arcturus
20 - Arcturus

@Andrew 
We can export multiple sheets of Excel file by providing the full path without any macro.
The tools in the container are the ones I have modified or added.
Anyway, also make a standard Macro Sample in case you have special requirments.

0217-Andrew.PNG

Andrew
5 - Atom

Angelos, thank you very much.  Your solution has been very helpful for me in understanding Macro construction.  Your solution works perfectly.  Appreciate the help and quick response.

Andrew

AngelosPachis
16 - Nebula

I'm glad that was helpful @Andrew, if my earlier post helped you reach an answer then please mark it as a solution so this thread can be closed.

 

Best,

Angelos

Labels