Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Formula to Separate String and Number into separate columns

shelbybradley
7 - Meteor

Hello, 

 

I am trying to separate a number attached to a string into its own column. Here is a depiction of my current data:

Alteryx intitial data.PNG

 The formula I have now (below) is not working on strings with double digit numbers attached:

Alteryx - formula current.PNG

 This is my current output. As you can see, the formula only separates the last digit of a 2-digit number.

current output.PNG

 

Can someone recommend another formula / approach to help me with this issue?

 

Thanks!

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @shelbybradley 

 

use regex tool parse method like below

 

atcodedog05_0-1645031562001.png

 

Hope this helps : )

 

binuacs
20 - Arcturus

@shelbybradley 

REGEX_Replace([Name], '[^\d]+', '')

binuacs_0-1645031665534.png

 

shelbybradley
7 - Meteor

Thanks - @binuacs 

 

I now have that ID in the new column, as shown below:

current output 2.PNG

 But how do I separate them so that the number is no longer is the "name" column like below?

future output 2.PNG

atcodedog05
22 - Nova
22 - Nova

Hi @shelbybradley 

 

Try this if you want to use formula tool only

 

atcodedog05_0-1645034905211.png

 

Hope this helps : )

 

binuacs
20 - Arcturus

@shelbybradley  another option for extracting only strings

REGEX_Replace([Name], '[\d]+', '')

 

binuacs_0-1645082807704.png

 

Labels