Forum Discussion

SebFelSch's avatar
SebFelSch
New Member
9 years ago
Solved

How to change column format?

Hello,   I want to change in a column the text from 1,2,3,4,5...,11,12,13,...111,112,113 to 001,002,003,...,011,...111,112,113.   I tried format(text,"000") but it does not work.   My problem i...
  • MattAllington's avatar
    MattAllington
    9 years ago

    You will need to add a custom column, and then add the following formula.

     

    =Text.PadStart(Number.ToText([Column1]),4,"0")

     

    The red section converts the numeric column to text.  This is required before you can pad out from the left

    The blue section then pads out the text string to be (in this case 4 characters long using a "0" as the padding character).