Skip to main content

Combiner.CombineTextByDelimiter

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

Syntax

Combiner.CombineTextByDelimiter(
delimiter as text,
optional quoteStyle as QuoteStyle.Type
) as function

Remarks

Returns a function that combines a list of text values into a single text value using the specified delimiter.

Examples

Example #1

Combine a list of text values using a semicolon delimiter.

Combiner.CombineTextByDelimiter(";")({"a", "b", "c"})

Result:

"a;b;c"

Example #2

Combine the text of two columns using a comma delimiter and CSV-style quoting.

let
Source = #table(
type table [Column1 = text, Column2 = text],
{{"a", "b"}, {"c", "d,e,f"}}
),
Merged = Table.CombineColumns(
Source,
{"Column1", "Column2"},
Combiner.CombineTextByDelimiter(",", QuoteStyle.Csv),
"Merged"
)
in
Merged

Result:

#table(
type table [Merged = text],
{{"a,b"}, {"c,""d,e,f"""}}
)

Category

Combiner