OpenBI Docs Buy

Text.TrimEnd

A text without the white space, or other characters you name, at its end.

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

Syntax

Text.TrimEnd(text as nullable text, optional trim as any) as nullable text
ParameterTypeDescription
textnullable textThe text to work on; null gives null.
trimany
optional
The characters to take away: one character as text, or a list of such. Left out, white space (spaces, tabs, line breaks).

Returns

nullable text. The text with the characters taken off its end; the start stays as it was.

Examples

Spaces after a name

Text.TrimEnd("Oslo   ")
"Oslo"

Trailing zeros of a price written as text

Text.TrimEnd("1.2500", "0")
"1.25"

Text.Trim, Text.TrimStart, Text.PadEnd.

Last updated · OpenBI Studio 0.3.79