Text.ToList

Text

Returns a list of single-character text values, one for each character in the text.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Text.ToList(text as text) as list

Parameters

NameTypeRequiredDescription
texttextYesThe text value to convert to a list of characters.

Return Value

listA list of single-character text values representing each character in text.

Remarks

Text.ToList splits a text value into a list of single-character elements, preserving the original order. It is the standard way to perform character-level operations in Power Query — iterating over every character in a string using list functions.

The resulting list can be processed with any list function: List.Select to filter characters, List.Transform to map over them (e.g., with Character.ToNumber), List.Count to count occurrences, or List.Accumulate for stateful processing. To reconstruct text from the list, use Text.Combine.

Text.ToList is more expressive than Text.Split for character-level work because it makes the intent clear and does not require a separator argument. It is equivalent to Text.Split only when using a delimiter that never appears in the string.

Note that Text.ToList operates on Unicode code units, not grapheme clusters. Characters that consist of multiple code units (such as certain emoji or composed diacritics) may appear as multiple list entries.

Examples

Example 1: Split a string into individual characters

Text.ToList("E001")
Result
Result
1E,0,0,1

Example 2: Count occurrences of a character

let
    chars = Text.ToList("alice smith"),
    spaces = List.Select(chars, each _ = " ")
in
    List.Count(spaces)
Applied Steps

The final output — filters the character list to keep only space characters, then counts them to find the number of spaces.

Result
11

Example 3: Get distinct characters in a string

List.Distinct(Text.ToList("Engineering"))
Result
Result
1E,n,g,i,e,r,i,n,g

Example 4: Transform and rebuild — uppercase each character individually

Result
Result
1ALICE

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks