Alteryx Designer Discussions

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

Splitting a column into two different column in Alteryx.

kiotsuresh
7 - Meteor

I'm Having the Data as below,

Category
Home
     Furniture
     Dining
Office
     Printers
     Laptops
Library
     Books
     Pens

 

And So on...


I need to split this "Category" column into Two Columns "Category1"and  "Category2" .

Output:

 

Category1Category2
HomeFurniture
HomeDining
OfficePrinters
OfficeLaptops
LibraryBooks
LibraryPens

 

Can Somebody help on this please?. After splitting into two I need to left join both the output(which I'm aware).

13 REPLIES 13
Reddy4
7 - Meteor

Reddy4_3-1657051716820.png

 

 

 

  1. Use Multi-Row Formula tool to create new field named Category1 of V_String datatype. In the Expression use this "IF Startswith([Category], ' ') = -1 THEN [Row-1:Category1] ELSE [Category] ENDIF"
  2. Then use Filter Tool with expression "[Category] != [Category1]"
  3. Then, use Data Cleansing tool to remove Leading and Trailing Whitespace
  4. Finally, use Select tool to rename Category to Category2 and reorder the fields

 

Parinita
6 - Meteoroid

Hi kiotsuresh,

 

Please find the exact solution for your challenge attached in the file.

 

Please like and share if it helps solving your problem.

grazitti_sapna
16 - Nebula

Hello @kiotsuresh, try this.

grazitti_sapna_0-1657089581987.png

 

I hope this helps!

Thanks!

Sapna Gupta
kiotsuresh
7 - Meteor

I have Used a lookup table and Achieved the solution. Thanks Everyone!

Labels