Free Trial

Alteryx Designer Desktop Discussions

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

Iterative Macro : appending new column every iterations

pchong
8 - Asteroid

Hi Community!

I'm looking to iterate a simple input of numbers and iterate multiple times and append each result as a new column every iteration.

In this example, I want to multiply the original number by 2 every iteration.
Sample input :

OriginalNumber
11
22
33
44
55


Desired result (dynamically rename result columns) :

OriginalNumberNum1Num2Num3Num4Num5
112481632
2248163264
33612244896
448163264128
5510204080160
6612244896192

 

I couldn't get the macro to work, and hope I can get some help here!
In my sample workflow here, I only want it to iterate 5 times.

Any help is appreciated, thanks!

6 REPLIES 6
Raj
16 - Nebula

./

pchong
8 - Asteroid

Hi Raj,

 

Unfortunately the video is not helpful.

I understand that piece of iterative macro, but it's a simpler one because it doesn't append the result each iteration.

It only output one single output and that's easier to implement.

Raj
16 - Nebula

@pchong 
find the workflow attached, Marco is tweaked a bit


mark done if solved.

CoG
14 - Magnetar

Adding columns dynamically is not a very simple procedure, but it can be done. I rebuilt your macro to accomplish the stated objective. Hopefully this is a valuable learning tool for you for: Iterative Macros, Dynamic Replace Tool, & Dynamic Rename Tool

Screenshot.png

 

Happy Solving!

pchong
8 - Asteroid

Thanks Raj! 

I was hoping the macro can do all the cross tab and so on, but this works as well!

pchong
8 - Asteroid

Thanks Andrew!

Dynamic Replace is new to me and it's very useful!

Labels
Top Solution Authors