Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Add a Leading Zero within Column?

I have a column of data in which the lack of leading zero in the single digit numbers is causing plotting order issues. I would like to add a leading zero to each single digit number, what is the ea...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

     

    Maybe not the tidiest solution, but if you always have the same string format:

    Table.TransformColumns(Source, {{"Column_name", each Text.BeforeDelimiter(_, "Stage ") & "Stage " & Number.ToText(Number.FromText(Text.AfterDelimiter(_, "Stage ")), "0#"), type text}})

     

    Kind regards,

    JB