Splitter.SplitTextByDelimiter

Splitter

Returns a function that splits text by a specified delimiter.

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

Syntax

Splitter.SplitTextByDelimiter(delimiter as text, optional quoteStyle as nullable number) as function

Parameters

NameTypeRequiredDescription
delimitertextYesThe text delimiter to split on.
quoteStylenumberNoA QuoteStyle value specifying how to handle quoted sections. Defaults to QuoteStyle.None.

Return Value

functionA function that takes a text value and returns a list of text parts split on the delimiter.

Remarks

Splitter.SplitTextByDelimiter returns a function that splits text at every occurrence of the specified delimiter. It is most commonly used as an argument to Table.SplitColumn to break a single column into multiple columns.

The optional quoteStyle parameter controls how quoted sections are handled. Use QuoteStyle.Csv to respect CSV quoting rules where delimiters inside quotes are ignored.

Examples

Example 1: Split employee names on space

Table.SelectColumns(
    Table.SplitColumn(
        Table.SelectColumns(Table.FirstN(Employees, 4), {"FullName"}),
        "FullName",
        Splitter.SplitTextByDelimiter(" "),
        {"FirstName", "LastName"}
    ),
    {"FirstName", "LastName"}
)
Result
FirstName
LastName
1alicesmith
2BOBJONES
3CharlieBrown
4dianaPRINCE

Compatibility

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