Hi, Alteryx Experts:
I am looking to remove "0" at the end of a strring. For example:
1.1250
I would like to shorten this to
1.125
However if we have this number
6000
This should be left as
6000
So the formula should only be valid for those with decimal points and only if last digit is equal to "0" - then remove that "0".
Is there a good regex language I can write in the formula to make this happen?
Thank you so much for your help in advance!!!!!!
Solved! Go to Solution.
Assuming that the String column is stored as a string and not a number:
IF Contains([String], ".") AND Right([String], 1) = "0"
THEN Left([String], Length([String])-1)
ELSE [String]
ENDIF
Thank you, Brandon!!!