Text.Insert
A text with another text put in at a position.
Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Text.Insert(text as nullable text, offset as number, newText as text) as nullable text
| Parameter | Type | Description |
|---|---|---|
text | nullable text | The text to work on; null gives null. |
offset | number | Where to put the new text, from 0; the text's length puts it at the end. |
newText | text | The text to put in. |
Returns
nullable text. The longer text.
Examples
A dash in a product code
Text.Insert("SKU123", 3, "-")
"SKU-123"