OpenBI Docs Buy

Text.PadEnd

A text made a given length by adding a character at the end.

Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Text.PadEnd(text as nullable text, count as number, optional character as nullable text) as nullable text
ParameterTypeDescription
textnullable textThe text to work on; null gives null.
countnumberThe length the text should reach.
characternullable text
optional
The character to add, one character. Left out, a space.

Returns

nullable text. The padded text; a text already that long comes back as it is, never cut.

Remarks

  • The pad must be exactly one character: a longer text is an error.

Examples

Dots after a product name

Text.PadEnd("Chair", 8, ".")
"Chair..."

A text longer than the count

Text.PadEnd("Trondheim", 4)
"Trondheim"

Text.PadStart, Text.TrimEnd, Text.Repeat.

Last updated · OpenBI Studio 0.3.79