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

Alteryx Designer Desktop Discussions

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

Split data from single column into 2 columns

markosxman
5 - Atom

Hello

 

I would like to be able to split Column 1 into 2 columns.

 

One with the "number" one with the "description"

 

1-7811 Cash:Mizuho AUD725,009.58 
1-7812 Cash:Mizuho USD43,767.90 
1-7816 Cash:ANZ AUD10,823.24 
1-7817 Cash:Term Deposit154,040.00 
1-7823 Receivables - current:Interest receivable75.96 
1-7870 Prepayments52,239.04 

 

Am struggling to find the right commands!

 

 

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @markosxman one approach is to use regex to split your column. The expression below will find everything up to a digit with white space and put that in column and then put everything else into a second column.

 

Regex_18052021.JPG

atcodedog05
22 - Nova
22 - Nova

Hi @markosxman 

 

You can us regex tool parse mode and below expression to split into columns.

 

 

(\d\-\d+)\s(.*)

 

 

Workflow:

atcodedog05_0-1621331487463.png

 

Here is a resource on 

Regex tool parse mode : https://community.alteryx.com/t5/Interactive-Lessons/Parsing-Data-with-RegEx/ta-p/441415

 

Hope this helps 🙂

jdunkerley79
ACE Emeritus
ACE Emeritus

For an alternative to regular expressions (as they can be complicated), you could use the Text to Columns tool.

 

Based on your data splitting on Space would work.

jdunkerley79_0-1621331657121.png

 

markosxman
5 - Atom

Thanks that worked perfectly

Labels
Top Solution Authors