Splitter.SplitTextByAnyDelimiter
SplitterReturns a function that splits text at any occurrence of any delimiter in a list.
Syntax
Splitter.SplitTextByAnyDelimiter(delimiters as list, optional quoteStyle as nullable number, optional startAtEnd as nullable logical) as functionParameters
| Name | Type | Required | Description |
|---|---|---|---|
delimiters | list | Yes | A list of text delimiters. The text is split at every occurrence of any delimiter in this list. |
quoteStyle | number | No | A QuoteStyle value specifying how to handle quoted sections. Defaults to QuoteStyle.None. |
startAtEnd | logical | No | If true, splits are applied starting from the end of the text. Defaults to false. |
Return Value
function — A 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 | |
|---|---|---|---|
| 1 | 555 | 867 | 5309 |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks