OpenBI Docs Buy

Text.RemoveRange

A text with a run of characters cut out 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.RemoveRange(text as nullable text, offset as number, optional count as nullable number) as nullable text
ParameterTypeDescription
textnullable textThe text to work on; null gives null.
offsetnumberWhere the cut begins, from 0.
countnullable number
optional
How many characters to cut. Left out, one.

Returns

nullable text. The shorter text; an error when the cut reaches past the end.

Examples

One character

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

Five characters

Text.RemoveRange("NO-0150-Oslo", 2, 5)
"NO-Oslo"

Text.Insert, Text.ReplaceRange, Text.Range.

Last updated · OpenBI Studio 0.3.79