Text.Length
How many characters a text has.
Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Text.Length(text as nullable text) as nullable number
| Parameter | Type | Description |
|---|---|---|
text | nullable text | The text to measure; null gives null. |
Returns
nullable number. The count; 0 for an empty text.
Remarks
- Characters are counted as Power Query counts them, in UTF-16 units: æ ø å count one each, while an emoji or another character beyond the basic range counts two.
Examples
A city name
Text.Length("Trondheim")
9
An empty text
Text.Length("")
0