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
| Parameter | Type | Description |
|---|---|---|
text | nullable text | The text to work on; null gives null. |
index | number | The 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.