Combiner.CombineTextByDelimiter returns a function that joins a list of text values into one text value, with a delimiter between each. Available in Excel (Power Query) and Power BI Desktop.
If you want to merge columns in Power Query, or join text values with a separator, this is the combiner the Merge Columns command uses behind the scenes.
It works a little differently from most M functions, though. Instead of returning the combined text, it gives you back a function that does the combining. I’ll show you exactly how that works below.
Syntax of Combiner.CombineTextByDelimiter Function
Combiner.CombineTextByDelimiter(delimiter as text, optional quoteStyle as nullable number) as function
where
delimiter(required, text). The separator placed between the combined values.quoteStyle(optional, nullable number). AQuoteStyle.Typevalue that controls whether values containing the delimiter get wrapped in quotes. UseQuoteStyle.CsvorQuoteStyle.None. When omitted, it behaves likeQuoteStyle.Csv(see Example 3).
Returns: a function. The returned function takes a list of text values and combines them into a single text value, separated by the delimiter.
In plain terms, you call it once to set the delimiter, and it hands you back a combining function. You then apply that function to a list, or pass it to Table.CombineColumns.
Example 1: Combine a list of text values directly
Join three office-supply items into one comma-separated string.
let
Combined = Combiner.CombineTextByDelimiter(", ")({"Pen","Notebook","Stapler"})
in
Combined
Result: Pen, Notebook, Stapler
Note the two sets of parentheses. Combiner.CombineTextByDelimiter(", ") returns a function, and the ({"Pen","Notebook","Stapler"}) right after it applies that function to the list.
Example 2: Store the combiner and reuse it
Because the result is a function, you can store it in a variable and apply it as many times as you like. Here it builds two folder paths from their parts.
let
CombineParts = Combiner.CombineTextByDelimiter("/"),
Result = {CombineParts({"reports","2026","june"}),CombineParts({"invoices","2026","may"})}
in
Result
Result: {"reports/2026/june","invoices/2026/may"}
CombineParts is now a regular function. Each call joins one list with the / delimiter.
Example 3: Control quoting with the quoteStyle argument
When a value contains the delimiter itself, quoteStyle decides whether that value gets wrapped in quotes. This query combines the same two values three ways.
let
WithCsv = Combiner.CombineTextByDelimiter(", ",QuoteStyle.Csv)({"Acme Ltd","Portland, OR"}),
WithNone = Combiner.CombineTextByDelimiter(", ",QuoteStyle.None)({"Acme Ltd","Portland, OR"}),
DefaultStyle = Combiner.CombineTextByDelimiter(", ")({"Acme Ltd","Portland, OR"})
in
{WithCsv,WithNone,DefaultStyle}
Result:
WithCsv:Acme Ltd, "Portland, OR"WithNone:Acme Ltd, Portland, ORDefaultStyle:Acme Ltd, "Portland, OR"
QuoteStyle.Csv wraps Portland, OR in quotes because it contains the delimiter. QuoteStyle.None joins the raw text as-is.
Omitting the argument gives the same output as QuoteStyle.Csv. So pass QuoteStyle.None explicitly whenever you don’t want quotes added.
Example 4: Merge table columns with Table.CombineColumns
This is where you’ll actually use the function. Say a warehouse table stores each item’s location across three columns, and you want one Location code.
Here is the starting data:
| Building | Aisle | Bin |
|---|---|---|
| B1 | A4 | X07 |
| B2 | C1 | X19 |
| B1 | D6 | X02 |
Pass the combiner to Table.CombineColumns:
let
Source = Excel.CurrentWorkbook(){[Name="Bins"]}[Content],
Combined = Table.CombineColumns(Source,{"Building","Aisle","Bin"},Combiner.CombineTextByDelimiter("-",QuoteStyle.None),"Location")
in
Combined
This merges the three columns into one, with - between the parts.
The result is a single combined column:
| Location |
|---|
| B1-A4-X07 |
| B2-C1-X19 |
| B1-D6-X02 |
This is exactly the step the Merge Columns command (Transform tab) generates. The UI always passes QuoteStyle.None explicitly, because the default would quote any value containing the delimiter.
Example 5: Convert numbers to text before combining
The combining function only accepts text values. This invoice table has numeric Year and Seq columns, so they need converting first.
Here is the starting data:
| Prefix | Year | Seq |
|---|---|---|
| INV | 2026 | 18 |
| INV | 2026 | 19 |
| CRN | 2025 | 7 |
Change the numeric columns to text with Table.TransformColumnTypes, then combine:
let
Source = Excel.CurrentWorkbook(){[Name="Invoices"]}[Content],
Typed = Table.TransformColumnTypes(Source,{{"Year",type text},{"Seq",type text}}),
Combined = Table.CombineColumns(Typed,{"Prefix","Year","Seq"},Combiner.CombineTextByDelimiter("-",QuoteStyle.None),"InvoiceID")
in
Combined
The merge now works because every column is text:
| InvoiceID |
|---|
| INV-2026-18 |
| INV-2026-19 |
| CRN-2025-7 |
Skip the Typed step and the query throws a conversion error, because the combiner cannot turn numbers into text on its own.
Things to keep in mind with Combiner.CombineTextByDelimiter
- One set of parentheses gives you a function, not text. If the preview shows the word
functioninstead of your result, you configured the combiner but never applied it to a list. - Null behavior is not documented. Don’t rely on it. For null-safe merging, use a custom combiner such as
(values)=>Text.Combine(List.RemoveNulls(values),"-"), sinceText.Combineskips nulls. - Numbers in a plain list need
Text.From. Example 5 fixes numeric table columns; for a list, convert each item first withList.Transform, for exampleList.Transform(myList,Text.From). - Don’t delete
QuoteStyle.Nonefrom generated steps. Removing it switches the combiner to the quoting default (Example 3), which can silently change your output. - Don’t confuse it with
Table.Combine. Despite the similar name,Table.Combineappends tables on top of each other. It has nothing to do with merging columns.
Common questions about Combiner.CombineTextByDelimiter
How is it different from Text.Combine?
Text.Combine(list,delimiter) combines a list directly and skips null values. Combiner.CombineTextByDelimiter builds a reusable combining function for functions like Table.CombineColumns, and adds quoteStyle control.
What does Combiner.CombineTextByEachDelimiter do differently?
It takes a list of delimiters and uses one per gap, instead of repeating a single delimiter. Use it when each join point needs a different separator.
Can I keep the original columns after merging?
No, Table.CombineColumns replaces them. To keep the originals, add a new column instead, using Table.AddColumn with Text.Combine inside it.
List of All Power Query Functions
Related Power Query Functions / Articles: