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

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
21 - Polaris

@SrinivasanSugumaran one way of doing this

 

binuacs_0-1657348119003.png

binuacs_1-1657348166780.png

 

 

 

Qiu
21 - Polaris
21 - Polaris

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

0709-SrinivasanSugumaran.PNG

flying008
15 - Aurora

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
21 - Polaris
21 - Polaris

@SrinivasanSugumaran 
Glad to be helpful.

Labels
Top Solution Authors