In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more 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