Alteryx Designer Desktop Discussions

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

How to split column into multiple column based on the length of the cell

Gsiva3
8 - Asteroid

Hi Team,

I have an input with column A having different set of values in each row and the length of these cells are not certain means the length of each cell may vary from 6 to 300.

My concern is I want to split this into multiple column with length in each new column not exceeding 66.

I have attached the sample input and required output.

Please help me on this.

 

6 REPLIES 6
PhilipMannering
16 - Nebula
16 - Nebula

Hi @Gsiva3 

 

I think this does what you need.

PhilipMannering_0-1656490179805.png

 

AmalinaH
Alteryx
Alteryx

Hi @Gsiva3 you could use a RegEx tool to achieve this. The RegEx tool can specify the length of the string you would like to parse to. In this case we set the maximum length to 66.

 

I set the number of columns as 5 columns since the maximum character length is 300 (therefore there can be maximum of 5 columns to split to given each column is 66 characters long).

 

Please check if this matches your desired output (as there are some discrepancies with your required output columns).

AmalinaH_0-1656490268455.png

AmalinaH_1-1656490333721.png

 

Qiu
20 - Arcturus
20 - Arcturus

@PhilipMannering 
Nice one.

I was almost going to macro. 😁

grazitti_sapna
17 - Castor

@Gsiva3, in case you want this workflow to be dynamic for n number of columns, made a few tweaks to @PhilipMannering instead of tokenizing into columns I tokenized the data into rows.

grazitti_sapna_0-1656493504638.png

 

I hope this helps!

Thanks!

Sapna Gupta
Gsiva3
8 - Asteroid

Hi @grazitti_sapna @Qiu @AmalinaH @PhilipMannering 

Thanks for your support!

All the workflows are working fine!!

Qiu
20 - Arcturus
20 - Arcturus

@Gsiva3 
Glad to know it works out. and I am sorry that I did not actually contribute. 
Have a great day. 😁

Labels