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  

ArgumentDescription
tableThe Table to modify.
sourceColumnsThe list of columns to combine.
combinerThe table combiner function.
columnThe 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")  

MergedB
a,bc
b,cd
Show: