Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Text.PadEnd spaces getting trimmed

Hi,   I'm having issues with the Text.PadEnd function. It seems like Power BI trims away the spaces I want to add.   The function I'm using is: Text.PadEnd([firstname], 20, " ")   I can see ...
  • mahoneypat's avatar
    5 years ago

    I reproduced your issue loading from the query editor, but this DAX column expression did work.  Is [firstname] a column or a measure?

     

    WithSpaces = PadEnd[Column1] & REPT(" ", 15 - LEN(PadEnd[Column1]))

     

    Pat

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  Anonymous ,

    I created some data, used your function, and found it to work normally.

    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly