Table.Combine

Table

Appends multiple tables into a single table by stacking their rows.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Table.Combine(tables as list, optional columns as any) as table

Parameters

NameTypeRequiredDescription
tableslistYesA list of tables to combine.
columnsanyNoOptional column specification to control the output schema. Use this to select or reorder columns in the combined result.

Return Value

tableA single table containing all rows from the input tables.

Remarks

Table.Combine appends (stacks) the rows of two or more tables into a single table. This is the M equivalent of the "Append Queries" operation in the Power Query Editor UI.

The output columns are the union of all columns across the input tables. If a table does not have a column that another table has, the values for that column are null in the combined result.

Use the optional columns parameter to specify which columns to include in the output, rather than adding a separate Table.SelectColumns or Table.RemoveColumns step afterward. This keeps the query concise.

Examples

Example 1: Append two subsets of a table

let
    FirstPart = Table.SelectColumns(Table.FirstN(Sales, 3), {"CustomerName", "Product"}),
    LastPart = Table.SelectColumns(Table.LastN(Sales, 3), {"CustomerName", "Product"})
in
    Table.Combine({FirstPart, LastPart})
Result
CustomerName
Product
1AliceWidget A
2BobGadget B
3CharlieWidget C
4BobThingamajig E
5CharlieGadget B
6DianaWidget C

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks