Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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
16 - Nebula
16 - Nebula

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

Cheers,
TheOC
Connect with me:
LinkedIn 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
21 - Polaris

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