Splitter.SplitTextByEachDelimiter

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 the Splitter.SplitTextByEachDelimiter function can be used on its own, it is also used by the following functions:

Other functions related to Splitter.SplitTextByEachDelimiter are:

BI Gorilla Blog

Last update: November 17, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/splitter-splittextbyeachdelimiter
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.