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

Alteryx Designer Desktop Discussions

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

How do I remove leading zeros

Khristian_Evans
8 - Asteroid

Need Help removing leading zeroes , I want record to be just 1 not 001 

 

 
 
 

 

5 REPLIES 5
alexnajm
17 - Castor
17 - Castor

ReplaceChar([RecordID], "0", "")

Khristian_Evans
8 - Asteroid

Thanks for the quick reply, unfortunately I don't think that formula will work, That will replace ALL zeroes so "20'' would return '2' , do you know a formula for just leading zeroes? 

alexnajm
17 - Castor
17 - Castor

Great shout - in that case I'd just convert to a number 😊

alexnajm
17 - Castor
17 - Castor

You can also use TrimLeft: How To: Remove Leading Zeros From a Field

flying008
15 - Aurora

Hi, @Khristian_Evans 

 

Maybe you can use formula with :

ToString(ToNumber([RecordID]))

or

TrimLeft([RecordID], '0')

 

 

Labels