This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 08-10-2016 03:28 PM - edited on 12-08-2021 12:59 PM by SonaliM
Sample Input:
Sample Output:
Formula Configuration:
image.png
Formula Configuration:
image.png
This is super helpful. Thank you!
Angelo
I'm a new comer to Alteryx and the community. I notice your post for removal of leading zeroes was written back in 2016. My question to you is would you the Select Function now to perform this?
Tim
Wouldn't that RegEx replace all of the zeros? (Not only the leading zeros)
Ms. Bindy
As I found out later, YES!!
Thanks for getting back!
Tim
In my opinion, In the above scenario, if you do not want to replace 0 with "", while trimming leading 0, it would be simpler to use an IIF condition to check if Field1 == "0" and use the TRIMLEFT function in all other instances. You don't need to use any other tools.
IIF([Field1] == "0", "0", TRIMLEFT([Field1],"0"))