Hi,
I have a column with alphanumeric value. Some of the values are 5 digits, I would like to create a new column and add leading zero to make it all 6 digits.
I am using below but its giving me error as the column contains alphanumeric value and is in text data type
= Table.AddColumn(#"Previous Step", "Leading 0s", each Number.ToText([C_ColumnAlphaNumeric], Text.Repeat("0",6)))
How can I add leading zeros column?
Thanks,
Daven
Solved! Go to Solution.
is this what you want?
if Text.Length([Column1])=6 then [Column1] else "0"&[Column1]
Proud to be a Super User!
is this what you want?
if Text.Length([Column1])=6 then [Column1] else "0"&[Column1]
Proud to be a Super User!
Thanks Ryan! It worked
you are welcome
Proud to be a Super User!
Shabnam Watson demos Incremental refresh & Hybrid Tables and Leila Etaati demos Charticulator.
Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!
User | Count |
---|---|
365 | |
96 | |
64 | |
54 | |
38 |
User | Count |
---|---|
356 | |
110 | |
73 | |
60 | |
50 |