Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Iterate over rows of multiple files simultaneously

hf14
8 - Asteroid

I'm preparing a reconciliation report, checking if all three files (A, B, C) have same data for each RootID.

I want to check for all rootIDs, taking the first rootID i.e. first row from each file and transposed a preforming operations and outputting a template sheet for that ID, and then next it should read second  rooID (second row) from each file and do the same.

Formula -- 

IF ([FileA_Value]==[FileB_Value] AND
[FileB_Value]==[FileC_Value]) THEN "PASS"
elseif ([FileB_Value]=[FileC_Value]) then "PASS"

ELSE "FAIL" ENDIF

 

I have created a workflow having a container for each rootID (I have created two containers like the below attached). I know this is not a good solution and fail if I have hundreds of rootIDs.

Can this be turned into a macro? I don't know how to implement a macro for this.

I have attached all three files and my final output, cannot attach the workflow because of company restrictions.

 

hf14_0-1662631715820.png

 

 

 

4 REPLIES 4
mceleavey
17 - Castor
17 - Castor

Hi @hf14 ,

 

without your workflow we can't do anything but advise.

You can create a batch macro and run the workflow for each root ID. This would be your control parameter value, and so you would not need to create hardcoded containers for each RootID.

You can find out more about batch macros at the links below. 

 

I hope this helps,

 

M

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Batch-Macros/t...

https://help.alteryx.com/20221/designer/batch-macro

 

https://www.youtube.com/watch?v=YIAbQGQ_Hkg



Bulien

A batch macro is a special kind of macro that is typically needed to process a group of records based on a control parameter. The control parameter determines which group of records will be processed through the underlying macro logic. The macro will be run from beginning to end for each control ...
hf14
8 - Asteroid

Hi @mceleavey 

I have created a batch macro, it is perfectly outputting different sheets for each rootId but the data in there is coming weird. Why is one-to-many mapping happening there? Can anyone please solve this. Attached my current output and my desired output as well.

 

hf14_0-1662758525195.png

 

humafirdaus
5 - Atom

 @jdunkerley79  @mceleavey   

can anyone help?

hf14
8 - Asteroid

Hi @mceleavey 

I have created a batch macro, it is perfectly outputting different sheets for each rootId but the data in there is coming weird. Why is one-to-many mapping happening there? Can you please solve this. Attached my current output and my desired output as well.

 

 

Labels