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!
Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.
Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!
User | Count |
---|---|
343 | |
97 | |
61 | |
53 | |
48 |
User | Count |
---|---|
339 | |
123 | |
88 | |
69 | |
66 |