Table.Combine
TableAppends multiple tables into a single table by stacking their rows.
Syntax
Table.Combine(tables as list, optional columns as any) as tableParameters
| Name | Type | Required | Description |
|---|---|---|---|
tables | list | Yes | A list of tables to combine. |
columns | any | No | Optional column specification to control the output schema. Use this to select or reorder columns in the combined result. |
Return Value
table — A 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 | |
|---|---|---|
| 1 | Alice | Widget A |
| 2 | Bob | Gadget B |
| 3 | Charlie | Widget C |
| 4 | Bob | Thingamajig E |
| 5 | Charlie | Gadget B |
| 6 | Diana | Widget C |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks