Combiner.CombineTextByDelimiter
CombinerReturns a function that combines a list of text values using a specified delimiter.
Syntax
Combiner.CombineTextByDelimiter(delimiter as text, optional quoteStyle as nullable number) as functionParameters
| Name | Type | Required | Description |
|---|---|---|---|
delimiter | text | Yes | The text delimiter to insert between each value. |
quoteStyle | number | No | A QuoteStyle value specifying how to handle quoting. Defaults to QuoteStyle.None. |
Return Value
function — A 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 | |
|---|---|
| 1 | Alice, Widget A, East |
| 2 | Bob, Gadget B, West |
| 3 | Charlie, Widget C, East |
| 4 | Alice, Gadget D, North |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks