Dear community,
I would like to ask how we going to add zero in front of value below so that the length of value for each row is five. My main goal is i want to make all the value under column A , the length all is five, by adding those zero in front.
However, it is quite flexible which mean some value need to add two zero and some need to add three zero, how do we able to aumatically adding zero in front so that all value is 5 in length
Many thanks for the support
Solved! Go to Solution.
Hey @SH_94,
Slightly inelegant but you can use a formula like this:
IF Length([Input]) = 5 THEN [Input]
ELSEIF Length([Input]) = 4 THEN "0"+[Input]
ELSEIF Length([Input]) = 3 THEN "00"+[Input]
ELSEIF Length([Input]) = 2 THEN "000"+[Input]
ELSEIF Length([Input]) = 1 THEN "0000"+[Input]
ELSE "00000" ENDIF
The community has some quick and easy videos on formulas and the Formula Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20...
Any questions or issues please ask!
Hope that Helps
Ira Watt
Technical Consultant
Watt@Bulien.com
Is there a way to keep the leading zeros when exporting data in a .csv format?
Thank you