Text.PadStart

 

This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.

Returns a text value padded at the beginning with pad to make it at least length characters. If pad is not specified, whitespace is used as pad.

Text.PadStart(text as nullable text, length as number, optional pad as nullable text) as nullable text  

ArgumentDescription
textThe text to parse.
lengthThe length to pad to.
optional padThe text to pad with. If pad is not specified, whitespace is used as pad.
Text.PadStart("xyz", 5, "a") equals "aaxyz"  

Text.PadStart("xyz", 9, "pad") equals error  

Show: