Start Free Trial

Alteryx Designer Desktop Discussions

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

Text to Columns & Rows from Single Cell

kafka_u21
7 - Meteor

I am new to Alteryx, hence the query:

I have data formatted in an excel in a single column, i need to break it into multiple rows & columns with headers. how to go about it?

Single data cell contains this continuous data like : "ID:123,name:smith,city: chicago,state;IL,Country:US;ID:234,anem:john,city:LA,State:california"....

Basically i want it to be displayed in table structure with table headers of ID, Name, City, State & Country and data in rows.

11 REPLIES 11
ShankerV
17 - Castor

Hi @kafka_u21 

 

As per the data shared, the data's are in single line.

There is one uniqueness shared in the data; after every record there is one ";" as separator.

 

Screenshot 2023-07-18 223325.jpg

 

Many thanks

Shanker V 

ShankerV
17 - Castor

Hi @kafka_u21 

 

Further if you need to have the results like below, you can use one more Text to columns tool.

 

Screenshot 2023-07-18 223325.jpg

 

Step 1: Input

Screenshot 2023-07-18 223325.jpg

 

Step 2:

 

step2.jpg

 

 

Step 3:

 

step3.jpg

 

 

Step 4:

 

  

step4.jpg

 

Many thanks

Shanker V 

kafka_u21
7 - Meteor

This works great. Thanks a lot for this.

kafka_u21
7 - Meteor

Shanker V - the solution works great in most cases but when one of the columns is blank then it doesnt split into columns correctly, the alignment goes away. for example:ID:123,name:smith,city: chicago,state;IL,Country:US;ID:234,anem:john,city:LA,State:null,Country:US" then 2 separate columns are created. any workaround for that?

ShankerV
17 - Castor

Hi @kafka_u21 

 

For my better understanding, if you say the alignment goes away means you are referring to semi-colon after State in the below?

 

ID:123,name:smith,city: chicago,state;IL,Country:US;ID:234,anem:john,city:LA,State:null,Country:US

 

Many thanks

Shanker V

kafka_u21
7 - Meteor

yes correct. the semi colon comes as separate column in those rows which have State as blank

ShankerV
17 - Castor

Hi @kafka_u21 

 

I have added this Formula to overcome the issue.

 

 

 

Screenshot 2023-07-19 054734.jpg

 

Many thanks

Shanker V 

ShankerV
17 - Castor

Hi @kafka_u21 

 

Please find the below modifications done.

 

Step 2: Added filter tool.

step2.jpg

 

Step 3: Changed to $ symbol

step3.jpg

 

Step 4: Added extra ; symbol

 

step4.jpg

 

Step 5: Select tool remains the same.

 

Hope this helps. 

 

Many thanks

Shanker V

flying008
15 - Aurora

Hi, @kafka_u21 

 

FYI.  your input data is already changed, so detail as you need to be please follow @ShankerV .

 

录制_2023_07_19_08_33_22_397.gif

Labels
Top Solution Authors