Alteryx Designer Desktop Discussions

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

Duplicate columns dynamically

SrinivasanSugumaran
8 - Asteroid

Hi Team,

is there a way we can duplicate the number of columns dynamically.

 

Input Eg:

 

Itemcol1
Chocolate30
Food24
Vegetabls55

 

Suppose above is the input i have, then basis the dynamic field i pass the number of columns should be created with the same columns values. i.e if i pass in 2 as my dynamic input parameter, then it should append 2 more columns (col2, col3,) with same values as col. 1

output should be as below 

Itemcol1col2col3
Chocolate303030
Food242424
Vegetabls555555

 

Since i need this to be done dynamically for every month (20 cols depending on the working days) which might be eventually considered for year too just thought of seeking your advice.

 

thank you.

 

Regards

srinivasan

 

6 REPLIES 6
binuacs
20 - Arcturus

@SrinivasanSugumaran one way of doing this

 

binuacs_0-1657348119003.png

binuacs_1-1657348166780.png

 

 

 

Qiu
20 - Arcturus
20 - Arcturus

@SrinivasanSugumaran 
I hope you accept a Text Input as Dynamic Input 😁

0709-SrinivasanSugumaran.PNG

flying008
14 - Magnetar

Hi, @SrinivasanSugumaran 

 

Another way without macro for your need:

 

录制_2022_07_09_15_43_02_190.gif

SrinivasanSugumaran
8 - Asteroid

Hi @flying008 , @Qiu@binuacs ..Thanks much.. :-)

SrinivasanSugumaran
8 - Asteroid

Thanks @Qiu . It worked.

 

Qiu
20 - Arcturus
20 - Arcturus

@SrinivasanSugumaran 
Glad to be helpful.

Labels