Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Iterative Macro with Filter

MaPerez
7 - Meteor

Greetings,

 

I have this workflow to calculate a score with a decision tree. I need this process to be iterative througth the stores number... I mean:

 

I have three stores 100, 101 and 102.

 

First calculate score for the store 100, second for the store 101 and third for the 102. All these result should be saved in a single file.

 

I did this process but with a filter using a text box tool but I have to manually write the stores (and I need to make the score automatically)

 

Can anyone help me?

4 REPLIES 4
NicoleJohnson
ACE Emeritus
ACE Emeritus

Try a batch macro! You will need two inputs to feed into the batch macro - one with the data, and one with a summarized list of store numbers that will feed into the upside ? after your macro is inserted into your workflow. In the macro itself, you configure the Control Parameter to be the value that your filter uses, rather than hard-coding the number - see formula configuration below. Then the rest of your workflow would perform the calculations as desired and output the results in a single file (use a Macro output tool if you want to use those results in the rest of your main workflow.) 

 

decisiontreemacro.JPG

 

Hope that helps point you in the right direction? Let us know if further clarification is needed!

 

Cheers!

NJ

MaPerez
7 - Meteor

Hi Nicole,

 

Can you share the workflow with the solution? (The one that is attached is not related with this question)

 

Thank you so much!!

BenMoss
ACE Emeritus
ACE Emeritus

Hi @MaPerez@NicoleJohnsons solution is exactly what I would look to do.

 

I think you should take time to consume her advice and look at how the workflow has been built. This should provide you with an understanding about how it can be translated to your workflow and situation.

 

Once you have made an attempt then you can perhaps give some follow up questions that we could help you with in order to reach your solution.

 

Ben

MaPerez
7 - Meteor

Thanks Nicole I configure it my macro with your advices and get the result!!

Labels