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.

Dynamically passing values

AshwinStark1993
5 - Atom

I did not worked on macros, I'm new to this and I'm trying to solve one logic as given below. Please help me in understanding logic behind that and solution of the problem.

 

  1. Input file is received with n columns out of which m columns have delimited data. User should have ability to select the columns they want to expand and you have to provide all possible combinations as output (Make the selection dynamic so that any number of delimitation in a column can be handled):-

Example with 2 column. The actual macro should be able to accommodate more columns depending on selection):-

                Input

               

Col1

Col2

Col3

A,B

C,D,E

F

 

If user selects Col1

Output

Col1

Col2

Col3

A

C,D,E

F

B

C,D,E

F

 

If user selects Col2

Output

Col1

Col2

Col3

A,B

C

F

A,B

D

F

A,B

E

F

 

If user selects Col1 and Col2

Output

Col1

Col2

Col3

A

C

F

A

D

F

A

E

F

B

C

F

B

D

F

B

E

F

 

2 REPLIES 2
DawnDuong
13 - Pulsar
13 - Pulsar

Hi @AshwinStark1993 

you do not need macro for it.
You can use Dropdown interface tool that allows users to dynamically select the column. This can be done by connecting the input file to the DropDown which will allow user to select the field.

as to splitting the column to rows, you can get this done via the Text To Column tool, with comma as delimeter and select output to rows.

put these 2 together will get you the desired output.

dawn 

ArtApa
Alteryx
Alteryx

Hi @AshwinStark1993 - Here is how you can do this:

ArtApa_0-1625116453242.png

ArtApa_1-1625116497298.png

ArtApa_2-1625116530512.png

ArtApa_3-1625116551768.png

 

 

 

Labels