Free Trial

Alteryx Designer Desktop Discussions

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

Separating Last Two Characters Into Different Column

mf16627
5 - Atom

What is the best way to separate the last two characters into a different column? Example below:

 

Combined ItemItem Type
Dual packPPDual packPP
Snow cone cups, 50 pcsSCSnow cone cups, 50 pcsSC
Hot Dog Buns, 24 pcsHDHot Dog Buns, 24 pcsHD
Popcorn Salt, 80 oz, garlic butterPPPopcorn Salt, 80 oz, garlic butterPP
3 REPLIES 3
Prometheus
12 - Quasar

@mf16627 I used a Formula tool to create Item Type using this expression: Right([Combined ], 2). Then I created Item by replacing the values I removed from Combined with nothing: Replace([Combined ], [Item Type], '').

Separating Field.PNG

ed_hayter
12 - Quasar

Opted for a right([field], 2) string function to get the last two characters then a left([field], findstring([field], [target]). To then make a column with everything preceeding the last two characters.

 

image.png

Deano478
12 - Quasar

hey @mf16627 you can use the text to columns tool with this delimiter  and split to 3 columns:

 

(.*?)([A-Z]+)$

 

 

 

Labels
Top Solution Authors