OpenBI Docs Buy

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
ParameterTypeDescription
textnullable textThe text to work on; null gives null.
offsetnumberWhere to put the new text, from 0; the text's length puts it at the end.
newTexttextThe text to put in.

Returns

nullable text. The longer text.

Examples

A dash in a product code

Text.Insert("SKU123", 3, "-")
"SKU-123"

Text.ReplaceRange, Text.RemoveRange, Text.PadStart.

Last updated · OpenBI Studio 0.3.79