Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Text to Columns

rrevuru
5 - Atom

Hello:

 

I have a column with name, "Stage", and with Row values as follows

1 - New Meeting 

2 - Old Meeting

3 - Not interested.

 

I wanted to convert these using text to columns with Numerals in one column, and String in another column. The way i got it working is using Text to columns twice, which i dont think is best practice, looking for any better suggestions

 

 

6 REPLIES 6
bpatel
Alteryx Alumni (Retired)

hi @rrevuru ,

 

did you use "-" as the delimiter and set number of columns to 2?

 

hope this helps!

rrevuru
5 - Atom

Yes, i used - as a demiliter, but the problem is there is whitespace between delimiters.

EW
11 - Bolide

One method would be to use RegEx (parse) instead with something like (\d+) - (.+) like the attached.  Regex is great for data that has consistent structure like the " - " in your data set.   

 

Regex.PNG

bpatel
Alteryx Alumni (Retired)

@rrevuru ,

does your configuration look like this?

bpatel_0-1578008111037.png

rrevuru
5 - Atom

@bpatel

 

I had the exact same configuration as yours, but somehow i was getting a different result

 

Column1 - Number

Column2 - (-)Name

 

Thanks for your help though, really appreciate it. Regex provided by @EW worked really well..

 

meghak1590
7 - Meteor

You can use a formula tool and use a substring function Substring(String,Start,Length) to extract the part of a string Column.

Labels