Table.CombineColumns
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
The inverse of Table.SplitColumns, Table.CombineColumns merge columns using a combiner function to produce a new column.
Table.CombineColumns(table as table, sourceColumns as list, combiner as function, column as text) as table
| Argument | Description |
|---|---|
| table | The Table to modify. |
| sourceColumns | The list of columns to combine. |
| combiner | The table combiner function. |
| column | The column to modify. |
Table.CombineColumns(Table.FromRecords(
{
[A.1 = "a", A.2 = "b", B = "c" ],
[A.1 = "b", A.2 = "c", B = "d"]},
{"A.1","A.2","B"}),{"A.1", "A.2"},Combiner.CombineTextByDelimiter(","),"Merged")
| Merged | B |
|---|---|
| a,b | c |
| b,c | d |
Show: