Text.Insert Function in Power Query

The Text.Insert function inserts one text value into another at a given position and returns the resultant text. Positions start from the left and it’s started from index 0.

Syntax

Text.Insert(text as nullable text, offset as number, newText as text) as nullable text

Note: If the offset is greater than the number of characters of the given text, then an error is thrown.

Example: Insert the specified text at position 6 from left.

Power Query M

let
    Source = Text.Insert("Ashish", 6, " Goel")
in
    Source

The output will be “Ashish Goel”.