OpenBI Docs Buy

Text.Remove

A text with every occurrence of the characters you name taken out.

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

Syntax

Text.Remove(text as nullable text, removeChars as any) as nullable text
ParameterTypeDescription
textnullable textThe text to work on; null gives null.
removeCharsanyOne character as text, or a list of such, for example {" ", "-"} or {"0".."9"}.

Returns

nullable text. The text without those characters.

Remarks

  • Case counts: removing "o" leaves "O".

Examples

A phone number without spaces, dashes and plus

Text.Remove("+47 22-33 44", {" ", "-", "+"})
"47223344"

Without digits

Text.Remove("Oslo 0150", {"0".."9"})
"Oslo "

Text.Select, Text.Replace, Text.Trim.

Last updated · OpenBI Studio 0.3.79