Text.ReplaceRange
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Replaces length characters in a text value starting at a zero-based offset with the new text value.
Text.ReplaceRange(text as nullable text, offset as number, length as number, newText as text) as nullable text
| Argument | Description |
|---|---|
| text | The text to parse. |
| offset | The beginning of the range. |
| length | The length of the range. |
| newText | The replacement text. |
Text.ReplaceRange("abcdef", 2, 3, "xyz") equals "abxyzf"
Show: