Start Free Trial

Alteryx Designer Desktop Discussions

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

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
18 - Pollux
18 - Pollux

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
18 - Pollux
18 - Pollux

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

alexnajm
18 - Pollux
18 - Pollux

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