Alteryx Designer Desktop Discussions

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

Split value in one cell into muti-rows

k3pineapple
8 - Asteroid

Hi All,

 

I am stuck on a data cleansing progress flow.

Need your help to build a flow to split the value in one cell, every cell has dirty value need to be reformatting. Thx

 

Input

IDNameAccount1Account2
1ABC12345{12345}
2CDE34567{123 456 78} {34567}
3FGH78901{789 01 237^78901}
4IJK2345623456
5LMN345 678 90{345 678 90}

 

Output

IDNameAccount1Account2
1ABC1234512345
2CDE34567123 456 78
2CDE3456734567
3FGH78901789 01 237^78901
4IJK2345623456
5LMN345 678 90345 678 90
3 REPLIES 3
DataNath
17 - Castor

Hey @k3pineapple - how does something like this look? We use the } as a delimiter to split to rows on in the Text-To-Columns tool. Following that, we simply remove { and trim to remove additional whitespace. Seems to get what you're after but please do let us know if this doesn't quite fit your actual data.

FinnCharlton
13 - Pulsar

Hi @k3pineapple , you can do this with the RegEx tokenise tool, and clean the data with a RegEx Replace function:

 

image.png

 

The RegEx expression looks intimidating, but it is just telling the tool to split anything within { } onto a new line, also accounting for digits not it { }.

flying008
14 - Magnetar

Hi, @k3pineapple 

 

Maybe you can use RegEx tool by Tokenize method:

 

 

 

Spoiler
([\d\s\^]+)(?>\}|$)

 

录制_2023_08_24_17_28_11_622.gif

Labels