Alteryx Designer Desktop Discussions

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

Splitting records with one attribute data into multiple records

AmrithKandlur
7 - Meteor

Hi.,, below is a sample data that I have pasted.

 

Name,age,work location

John,28,London|new york|California 

Mark,32,Sydney|Canberra

Susie,40,Delhi,Bangalore|Chennai|Mumbai

 

I want to get the above data as below

 

Name,age,work location

John,28,London 

John,28,new york 

John,28, California 

Mark,32,Sydney

Mark,32,Canberra

Susie,40,Delhi

Susie,40,Bangalore

Susie,40,Chennai

Susie,40,Mumbai

 

Please do note that in the "work location" attribute, there is data separated using pipe and the number of pipes is not consistent. I mean, it could sometimes have two locations info or sometimes more.

 

Please help how I can get this done using Alteryx.

7 REPLIES 7
Robin_McIntosh
11 - Bolide

You'll want to use Text to Rows.

 

Robin_McIntosh_0-1659018675001.png

 

IraWatt
17 - Castor
17 - Castor

Hey @AmrithKandlur,

Here is one way to do this:

IraWatt_0-1659018731231.png

The text to column tool can split to rows to achieve this. The community has some quick and easy videos on the text to column tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20... 


Ira Watt
Technical Consultant
Watt@Bulien.com 

 

Kinga
8 - Asteroid

I used two Text to column: first split to columns second to rows:

Kinga_0-1659021445707.png

 

AmrithKandlur
7 - Meteor

Thanks everyone, it was of great help :)

AmrithKandlur
7 - Meteor

Hi All,

 

In addition to that, I have a challenge with the following scenario.

 

Name,age,Range

John,28,TJY00783 HULB002-TJY00783 HULB004

Mark,32,Sydney,TJY00456 HULB002-TJY00456 HULB006

 

I want the data to be like below (i am using only the first records above as an example of split below)

Name,age,Range

John,28,TJY00783 HULB002

John,28,TJY00783 HULB003

John,28,TJY00783 HULB004

Mark,32,Sydney,TJY00456 HULB002

Mark,32,Sydney,TJY00456 HULB003

Mark,32,Sydney,TJY00456 HULB004

Mark,32,Sydney,TJY00456 HULB005

Mark,32,Sydney,TJY00456 HULB006

 

Alteryx should recognize that there is a - in the range text, then consider using the last three characters of the text before the - and last three characters after the - and split the records as above.

 

flying008
14 - Magnetar

Hi, @AmrithKandlur 

 

Maybe you can look the other post about this of you.

Kinga
8 - Asteroid

hi,

 

I made small workflow.

Labels