Text.Insert
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.
Returns a text value with newValue inserted into a text value starting at a zero-based offset.
Text.Insert(text as nullable text, offset as number, newText as text) as nullable text
| Argument | Description |
|---|---|
| text | The text to insert into. |
| offset | The index to insert at. |
| newText | The new text to insert. |
- If offset is less than zero or more than the length of a text value, an Expression.Error is thrown.
Text.Insert("abcdef",2,"X") equals "abXcdef"
Show: