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
| Parameter | Type | Description |
|---|---|---|
text | nullable text | The text to work on; null gives null. |
trim | any 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"