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.
Hi,
I need to add a zero to the start of number and have tried a few different ways but haven't managed to get the output I need.
The input data does not have a zero at the start of the number, I am bringing in the data as a string from the input data. The column includes some 4 digit codes and some 3 digit codes, if its a three digit code I want a zero to be included at the start. For example
Current 2100, 335, 100, 306, 3562
Need 2100, 0335, 0100, 0306, 3562
My cell is called ACC_Branch_Code, currently I have tried this
iif(length([ACC_BRANCH_CODE_ES_4 ])== 4,[ACC_BRANCH_CODE_ES_4 ],"0"+[ACC_BRANCH_CODE_ES_4 ])
Do I need to fix the digits in the cell to force the zero?
Any help would be appreciated.
Solved! Go to Solution.
Hey @BBell
In the formula tool try:
PadLeft([ACC_Branch_Code], 4, "0")
Part time Tableau, Part Time Alteryx. Full Time Awesome
Thank you this worked
Awesome! This solution worked for me as well.
Thanks for sharing.