Forum Discussion
Anonymous
2 years agoNot applicable
Add a Leading Zero if Length = 1, else do nothing
Please assist me using Power Query to create a custom column to Add a Leading Zero if Length = 1, else do nothing.
Anonymous Add a custom column:
if Text.Length([Hours]) = 1 then "0" & [Hours] else [Hours]
2 Replies
- Greg_DecklerCommunity Champion
Anonymous Add a custom column:
if Text.Length([Hours]) = 1 then "0" & [Hours] else [Hours] - dufoq3Community Champion
Text.PadStart([Hours], 2, "0")