Alteryx Designer Desktop Discussions

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

Batch Macro Using Conditional Statements to Assign Category

MJAGNARAIN
5 - Atom

Goal: Go through every row and assign a 'category/population identifier" to each record. It is possible for a record to be assigned to many populations, so when I drafted the flow I did not 'group by' my goal is to stack all this data on top of itself. The final output will allow me to split the master file by category and deliver it out to relevant groups. This article started me off.  https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Loop-through-multiple-conditions/td-p/...

 

I get a configuration error each time I try to do this. This is my first macro so any help would be greatly appreciated.Alteryx Macro Error.PNG

 

 

2 REPLIES 2
clmc9601
13 - Pulsar
13 - Pulsar

Hi @MJAGNARAIN,

 

You are so close! I made two minor changes, and I believe it works now. I zipped and attached the workflow with the changes. The macro currently evaluates each record twice (once for each condition) so the output contains twice as many records as the input.

 

Here are the changes I made:

1. Removed the  =  at the beginning of the promo conditions

2. In your second Macro action, you don't need the quotation marks. Just [#1] gets the job done since you are using an IF statement instead of writing the condition in the field like in the post you linked originally.

 

Hope this helps! Congrats on your first macro!

MJAGNARAIN
5 - Atom

What a start to 2021, thanks so very much for this. 

Labels