Text.ToList
A text as a list of its characters.
Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Text.ToList(text as text) as list
| Parameter | Type | Description |
|---|---|---|
text | text | The text to take apart. |
Returns
list. One text of one character per item, in order; an empty list for an empty text.
Compared with Power Query
Known difference in OpenBI Studio 0.3.79, found while this page was written and run on its engine:
List.Count(Text.ToList("a𐐨")): Power Query gives 3: a character beyond the basic range comes out as its two halves. OpenBI keeps it whole and gives 2.
Examples
The letters of a name
Text.ToList("Oslo")
{"O", "s", "l", "o"}
Counting the digits of a code
List.Count(List.Select(Text.ToList("NO-0150-B2"), each _ >= "0" and _ <= "9"))
5