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

Join rows with different set of columns (Schema) after each iteration

GaRaGe
8 - Asteroid

I am running a batch macro in my Alteryx workflow which gives 1 row as an output with different set of fields in each iteration. I need to append all these rows together by creating a new column, if required, after each iteration. Those rows which do not have values for the corresponding column should be replaced by 0. 

 

Any idea how to do it?

 

MACRO OUTPUT:

Iteration1

Nameidcourse1course3
Kim23441234

 

Iteration2

Nameidcourse2course3
Mia34452344

 

Iteration3

Nameidcourse1
Joe322235

 

After each iteration i need to append the output to a final output structure as below

Final output

Nameidcourse1course2course3
Kim234412034
Mia344502344
Joe32223500
5 REPLIES 5
alexey_nikityuk
8 - Asteroid

Here you go :) Let me know if that helpesave.PNG

GaRaGe
8 - Asteroid

thanks but my output is from a batch macro. at each iteration i get one output and the next iteration gives me a different set of columns. if i use transpose like how you did, then i need to dynamically change the key fields in transpose. is there a way to do that?

LordNeilLord
15 - Aurora

Hey @GaRaGe

 

In your batch macro interface designer settings choose this option:

 

batchsettings.png

 

Then add a data cleanse after to replace any nulls with 0

GaRaGe
8 - Asteroid

thanks a bunch. didnt know this configuration. works now. 

alexey_nikityuk
8 - Asteroid
No you would not need to change anything manually, coz it will be done dynamically. That is the beauty of the transpose/crosstab solution
Labels