OpenBI Docs Buy

Table.Combine

Puts the rows of several tables one after the other in a single table.

Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Table.Combine(tables as list, optional columns as any) as table
ParameterTypeDescription
tableslistThe tables, in the order their rows should come.
columnsany
optional
The result's columns, as a list of names or a table type; every column of every table when left out.

Returns

table. All the rows; a column some tables lack is null in their rows.

Remarks

  • Columns are matched by name, not by position.
  • This is the step Append queries writes in Transform data.

Examples

Two shops' sales

let
    Oslo = #table({"Shop", "Units"}, {{"Oslo", 4}, {"Oslo", 6}}),
    Bergen = #table({"Shop", "Units"}, {{"Bergen", 1}})
in
    Table.Combine({Oslo, Bergen})
ShopUnits
Oslo4
Oslo6
Bergen1

Columns that differ

let
    January = #table({"Product", "Units"}, {{"Chair", 4}}),
    February = #table({"Product", "Units", "Discount"}, {{"Desk", 1, 0.1}})
in
    Table.Combine({January, February})
ProductUnitsDiscount
Chair4null
Desk10.1

Only the columns you name

let
    January = #table({"Product", "Units"}, {{"Chair", 4}}),
    February = #table({"Product", "Units", "Discount"}, {{"Desk", 1, 0.1}})
in
    Table.Combine({January, February}, {"Product", "Units"})
ProductUnits
Chair4
Desk1

Table.InsertRows, Table.Join, Table.NestedJoin, List.Combine.

Last updated · OpenBI Studio 0.3.79