Alteryx Designer Desktop Discussions

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

How to split the column

Naresh
5 - Atom

Hi,

 

Can someone help me how to split the column based on the position.

 

Example: column consists of below data and I want to extract only 5 digits from right hand side of the column. 

i.e 12387 in below example 

 

ABCD - 12387

4 REPLIES 4
TheOC
15 - Aurora
15 - Aurora

Hi @Naresh 

You can use the function Right([string], 5) to retrieve the right 5 characters of the string.

https://help.alteryx.com/designer-cloud/string-functions

Cheers,
TheOC


Bulien
atcodedog05
22 - Nova
22 - Nova

Hi @Naresh 

 

Here is how you can do it. Method 2 will only work if the number length is always 5 and at the last. Method 1 will work for any length of numbers at the end.

Workflow:

atcodedog05_0-1646130755171.png

 

Hope this helps : )

 

binuacs
20 - Arcturus

@Naresh 

 

REGEX_Replace([Field1], '.+\-\s(.+)', '$1')

 

binuacs_0-1646131044655.png

 

 

 

saveeshkumar
9 - Comet

Hi @Naresh ,

 

One more method 😊.

 

saveeshkumar_0-1646131919832.png

 

substring([Field1],FindString([Field1], '-')+1,Length([Field1]))

 

 

Thanks.

Labels