on 08-10-2016 03:28 PM - edited on 08-09-2023 07:31 AM by Motivator
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"))