Alteryx Designer Desktop Discussions

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

Splitting one column to "N" number of columns

Gsiva3
8 - Asteroid

Hi team,

 

I have a column named "A" with value as "12345678901234659870123456789012346598701234567890123465987012345678901234659870".

My required output is I want to split each character from the above value into single column. So the length of the above mentioned value is "80", hence after splitting this value I need 80 columns.

 

Please support on this!

4 REPLIES 4
AngelosPachis
16 - Nebula

Hi @Gsiva3 ,

 

You can do that by using a RegEx tool, configured to tokenize your expression on " . " (which stands for every character, and every time a new character is met split to rows.

 

If you check the metadata tab after the crosstab tool, the total number of columns is 80 (81 because I have included a record ID column which you can drop with a select tool if you want)

AngelosPachis_0-1637048551365.png

Cheers,

Angelos

 

Sebastiaandb
12 - Quasar

@AngelosPachis Nice solution, i find it rather weird that Alteryx doesn't just generate the needed amount of column whenever you select "Split into columns" option in the regex tool, it only does that with the "Split into rows" option, such a shame haha. 

Gsiva3
8 - Asteroid

Thanks Angelos👍

 

Its working fine!!

AngelosPachis
16 - Nebula

@Sebastiaandb guess it gives you the flexibility in this way to keep all extra characters in the last column if you only care about the first 10 out of the total 80 in this example, but I agree it would be nice to have that feature.

Labels