Text.Remove Function in Power Query

The Text.Remove function returns the resultant text after removing all occurrences of the given character or list of characters from the input text value. The removeChars parameter can be a character value or a list of character values.

Note: The Text.Remove is a case sensitive function.

Syntax

Text.Remove(text as nullable text, removeChars as any) as nullable text

Example: Find how many characters are in the given text.

Power Query M

let
Source = Text.Remove("Ashish Goel", "a")
in
Source

The output of the above code is “Ashish Goel”. We can see that no character is removed from the given text as the function is case sensitive.

Example:

Power Query M

let
Source = Text.Remove("Ashish Goel", "h")
in
Source

The output of the above code is “Asis Goel”. We can see that all the occurences of “h” character is removed from the given text.