Text.Replace Function in Power Query

The Text.Replace function returns the resultant string after replacing all occurrences of a substring with a new text value. Please note that this function is case sensitive.

Syntax

Text.Replace(text as nullable text, old as text, new as text) as nullable text

Example: Replace every occurrence of "Ashish" in a sentence with "Katrina".

Power Query M

let
    Source = Text.Replace("Hello Ashish, How are you?", "Ashish", "Katrina")
in
    Source

The output will be in the string: “Hello Katrina, How are you?”. The output will be shown in the following image.

Text.Replace function in Power Query