Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Row values to multiple columns

rajatsaxena2105
7 - Meteor

Hi all,

 

I have an input column for which each row can have up to 13 comma separated values. What i need to do is, have 13 columns corresponding to the 13 values and then have a "x" below each column header corresponding to the value in the given row. The example is as below

 

Input DataOutput Data col1Output Data col2Output Data col3Output Data col4Output Data col5Output Data col6
BIL - CategoryReputational DamagePublic FinancesLegal RamificationsCrime FightingJudicial ProceedingsPersonal Safety of Citizens
Reputational Damage, Public Finances, Legal Ramificationsxxx   
Crime Fighting, Judicial Proceedings, Reputational Damage, Personal Safety of Citizensx  xxx
Judicial Proceedings, Reputational Damagex   x 
Reputational Damagex     

 

Can you please tell me how this can be done.

 

Best,

Rajat

4 REPLIES 4
gnans19
11 - Bolide

Using TextToColumns, Transpose, Append, Crosstab would do the trick. Attached workflow with my own data.

Note: In text to columns, I have also assumed number of columns as 13.

 

Hope this helps!

 

Regards,

Gnans

 

matrix.png

KaneG
Alteryx Alumni (Retired)

Similar approach to @gnans above. The key is to think about it in a different way. With Alteryx you can easily transform your data to perform a dynamic operation or a single operation over a dynamic number of fields.

 

Here's my similar answer (or set of)..

 

Cross-tab_List.png

rajatsaxena2105
7 - Meteor

Thanks Kane, works perfectly! :)

 

Best,

Rajat

rajatsaxena2105
7 - Meteor

Hey @gnans19 I had to just insert a data cleansing tool before the unique tool and it works perfectly, thank you :)

 

Best,

Rajat

Labels