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.
SOLVED

Mulitple Columns Text to Rows?

himaniyadav
6 - Meteoroid

Hi - I have a dataset that looks like something like this, where each column has delimited values:

criterion onecriterion twocode
1,2,3,22,3,4,1ABC,REC,TVD,INJ

 

and I want it to be split up to look like this but can't figure out how to use the text to column tool correctly:

 

criterion onecriterion twocode
12ABC
23REC

3

4TVD
21INJ

 

I found a way that sort of works by using text to columns instead of text to rows but it involves knowing exactly how many values there are to split up which will not always be the case, since this is dynamic workflow that will be reading and joining files from a directory. I attached an example worrflow of the kind of dataset I want to split into rows. Please help me! Thank you in advance.

4 REPLIES 4
LordNeilLord
15 - Aurora

Hey @himaniyadav 

 

Not so straight forward, but it needs a bit of transpose, then text to columns, throw in a bit of multirow then crosstab!!

 

I've attached an example

 

himaniyadav
6 - Meteoroid

Thank you so much for the solution so quickly! I'm new to Alteryx and spent so long trying to work it out myself, haha.

kimikoxavier
5 - Atom

Could someone please explain what [Row-1:NewField]+1 in the above Alteryx solution means? Thank you in advance. 

Dvorask
5 - Atom

It's been some time but chiming in here if someone reaches here through Google. [Row-1:NewField]+1 numbers the rows from 1 onwards*, and we'll use Multi-Row Formula's Group By function to loop back to 1 every time we're dealing with a new column header (every time the Name column changes).

 

*You could do the same thing using Record ID or Generate Rows if you only wanted to number the rows, but in this context, we have the added requirement of having to transform the data downstream. There should be a way to use Record ID or Generate Rows for this but Multi-Row Formula would be the most concise.

Labels