Alteryx Designer Desktop Discussions

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

HOW TO SEPARATE THE DIGITS IN ONE COLUMN

dunkindonut7777
8 - Asteroid

Hi I have a sample data here that has a column which contains alphanumeric characters. I want to extract the first 5 digits. Can you help me with this one please.

 

2-2110 Trade Creditors & Credit Cards : Trade Creditors : Trade Payable -USD Account
5-1100 Non-Comp and Benefits Cost : Rent : Rent OC
2-4140 Tax and Gov Statutory Liabilities : WBC Tax Liabilities : Withholding Tax Payable-Expanded
2 REPLIES 2
gawa
15 - Aurora
15 - Aurora

@dunkindonut7777 

A couple of ways. 

Text to Column tool would be the simplest way to parse data from data having specific delimiters(In this case white space).

Second way is to use RegEx tool, however you need to be familiar with regular expression.

Third way is to use Regex_Replace function of Formula tool, similar to second way.

image.png

Please refer to attached sample workflow.

flying008
14 - Magnetar

Hi, @dunkindonut7777 

 

 

Left(Trim([Txt]), 6)

or

Left(Trim([Txt]), FindString(Trim([Txt]), ' '))

 

Labels