Combiner.CombineTextByDelimiter

Combiner

Returns a function that combines a list of text values using a specified delimiter.

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

Syntax

Combiner.CombineTextByDelimiter(delimiter as text, optional quoteStyle as nullable number) as function

Parameters

NameTypeRequiredDescription
delimitertextYesThe text delimiter to insert between each value.
quoteStylenumberNoA QuoteStyle value specifying how to handle quoting. Defaults to QuoteStyle.None.

Return Value

functionA function that takes a list of text values and combines them into a single text string separated by the specified delimiter.

Remarks

Combiner.CombineTextByDelimiter returns a function — it does not combine text directly. The returned function accepts a list of text values and joins them with the specified delimiter. This is commonly used as an argument to Table.ToList to merge each row's values into a single delimited string.

The optional quoteStyle parameter controls whether values containing the delimiter are quoted. Use QuoteStyle.Csv to apply CSV-style quoting.

Examples

Example 1: Combine Sales columns into delimited text

let
    Subset = Table.SelectColumns(Table.FirstN(Sales, 4), {"CustomerName", "Product", "Region"}),
    CombinerFn = Combiner.CombineTextByDelimiter(", "),
    Combined = Table.ToList(Subset, CombinerFn)
in
    #table({"CombinedText"}, List.Transform(Combined, each {_}))
Result
CombinedText
1Alice, Widget A, East
2Bob, Gadget B, West
3Charlie, Widget C, East
4Alice, Gadget D, North

Compatibility

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