Splitter.SplitTextByAnyDelimiter

Splitter

Returns a function that splits text at any occurrence of any delimiter in a list.

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

Syntax

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

Parameters

NameTypeRequiredDescription
delimiterslistYesA list of text delimiters. The text is split at every occurrence of any delimiter in this list.
quoteStylenumberNoA QuoteStyle value specifying how to handle quoted sections. Defaults to QuoteStyle.None.
startAtEndlogicalNoIf true, splits are applied starting from the end of the text. Defaults to false.

Return Value

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

Remarks

Splitter.SplitTextByAnyDelimiter returns a function that splits text at every occurrence of any delimiter in the provided list. All delimiters are treated equivalently — the text is split wherever any of them appear. This is useful when your data may use inconsistent separators (e.g., commas, semicolons, or pipes).

Examples

Example 1: Split on multiple possible delimiters

let
    SplitFn = Splitter.SplitTextByAnyDelimiter({"-", "."}),
    PhoneParts = SplitFn("555-867-5309")
in
    #table({"Part1", "Part2", "Part3"}, {{PhoneParts{0}, PhoneParts{1}, PhoneParts{2}}})
Result
Part1
Part2
Part3
15558675309

Compatibility

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