Free Trial

Alteryx Designer Desktop Discussions

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

separating text by leng

parria1
8 - Asteroid

I have a field of varying length. Some of the rows are 6 length which is what is needed. however some are multiples of six and i need those split out.

 

for example,

the column below 

 

008334008847183194188052500306

 

needs to be split into multiple columns 008334 008847 183194 188052 500306

 

so this would now be five columns. 

 

how would i do this?

6 REPLIES 6
AngelosPachis
16 - Nebula

Hi @parria1 ,

 

You can split on each digit and then count the number of digits to form groups of six. You can split to each digit via a RegEx tool.

 

AngelosPachis_0-1609961484293.png

 

Then it's just a matter of identifying the correct groups, before forming the complete 6-digits fields again.

 

Hope that helps.

 

Regards,

 

Angelos

 

fmvizcaino
17 - Castor
17 - Castor

Hi @parria1 ,

 

Here is an example for you, it is achieavable using a group of tools described in the attached example.

fmvizcaino_0-1609961612898.png

 

Best,

FErnando Vizcaino

 

parria1
8 - Asteroid

your workflow works fine on my example but when i insert it into my larger production workflow it just outputs the first digit of the field instead of six. it splits it to rows, but each record as just the first digit of the field shown.

 

for example 

RecordID Digit Group Output
1 0 008334
2 1 008334
2 2 008847
2 3 183194
2 4 188052
2 5 500306

 

becomes this

RecordID Digit Group Output
1 0 0
2 1 0
2 2 0
2 3 1
2 4 1
2 5 5

AngelosPachis
16 - Nebula

Hi @parria1 ,

 

Is your input those digits below?

 

 

 

008334
008334
008847
183194
188052
500306

 

 

Can you make sure that you have configured the summarize tool to concatenate the digits (instead of any other selection, such as First?)

 

Untitled.png

 

parria1
8 - Asteroid

actually i do not need anything after the regex tool this is perfect, thanks.

parria1
8 - Asteroid

sorry, i cannot get this to work. the regex tool in the other answer is all that is needed.

Labels
Top Solution Authors