In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
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

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
Top Solution Authors