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