There is a column in which the value must be three digits. Sometimes it has a 1 or a 2 digit value, but in order to make it a 3 digit value, 0 (zero) needs be added at the beginning, like in the following example:
001 | 001 |
2 | 002 |
03 | 003 |
Y1 | 0Y1 |
YZ | 0YZ |
XYZ | XYZ |
Please advise?
Got the solution.
New column = Table.AddColumn(#"Previous Step", "New Colum", each if Text.Length([Column1])=1 then "00"&[Column1] else if Text.Length([Column1])=2 then "0"&[Column1] else [Column1])
mmbr1606
9
Super User 2025 Season 1
stampcoin
7
SD-13050734-0
6