Splitter.SplitTextByEachDelimiter

Updated on

Splitter.SplitTextByEachDelimiter is a Power Query M function that splits text into a list at each specified delimiter in sequence. The function returns a list of text segments after applying the sequential delimiter-based splitting.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Splitter.SplitTextByEachDelimiter(
   delimiters as list,
   optional quoteStyle as nullable number,
   optional startAtEnd as nullable logical,
) as function

Description

Returns a function that splits text into a list of text at each specified delimiter in sequence.

Examples

Split the input by comma, then semicolon, starting from the beginning of the input.

// Output: {"a", "b", "c,d"}
Splitter.SplitTextByEachDelimiter( {",", ";"} )( "a,b;c,d" )

Split the input by comma, then semicolon, treating quotes like any other character and starting from the end of the input.

// Output: {"a,""b", "c""", "d"}
let
    startAtEnd = true
in
    Splitter.SplitTextByEachDelimiter( {",", ";"}, QuoteStyle.None, startAtEnd )( "a,""b;c"",d" )

Used by

While you can use the Splitter.SplitTextByEachDelimiter function by itself, it also works together with:

Other functions related to Splitter.SplitTextByEachDelimiter are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/splitter-splittextbyeachdelimiter