We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

TRIMMING THE FIRST TWO CHARACTERS

dunkindonut7777
8 - Asteroid

Hello I have a data here that contains 10 characters and 8 characters. Some values has 10 characters and I want to remove the first two digits without touching the other 8 characters. 

ID CodeExpected Output (New ID code)
515155000251550002
515155200051552000
3030030230300302
1101803111018031
706270050362700503

 

Basically, I just want to remove the first two characters. Can you help me with this one please?

2 REPLIES 2
caltang
17 - Castor
17 - Castor

Try this:

 

IF LEFT(ToString([ID Code]),2) IN ("51","70")
THEN RIGHT(ToString([ID Code],8)
ELSE ToString([ID Code])
ENDIF

 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
CoG
14 - Magnetar

Alternatively, you can just use

RIGHT(ToString([ID Code],8)

 

Alternatively, Alternatively, if you already have a string type column:

RIGHT([ID Code], 8)

Labels
Top Solution Authors