OpenBI Docs Buy

Text.At

The character at a position of a text, counted from 0.

Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Text.At(text as nullable text, index as number) as nullable text
ParameterTypeDescription
textnullable textThe text to work on; null gives null.
indexnumberThe position, from 0 for the first character.

Returns

nullable text. A text of one character; an error when the position is past the end.

Examples

The fifth character

Text.At("SKU-123", 4)
"1"

Position 4 is the fifth character.

Text.Range, Text.Middle, Text.ToList.

Last updated · OpenBI Studio 0.3.79