Downloads
Power Query MTable: combine and joinBeginner

Table.Combine

Stacks several tables with matching columns into one longer table.

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

Returns: A table with the rows of all the input tables.

What it does

Table.Combine puts tables on top of each other. Twelve monthly bank exports with the same layout become one table with every month's transactions. Columns are matched by name, so the files must use the same headings. A column that is missing from one file comes out blank for those rows.

Syntax and arguments

Example

Two monthly bank exports, saved as separate tables in the workbook, are stacked into one table for the quarter.

let
    January = Excel.CurrentWorkbook(){[Name = "Bank_Jan"]}[Content],
    February = Excel.CurrentWorkbook(){[Name = "Bank_Feb"]}[Content],
    Quarter = Table.Combine({January, February})
in
    Quarter

The result has the transactions from both months. Use the same approach with more months in the list.

Things to watch

In business terms

Monthly exports stacked into a quarter or year is the basis for year-to-date reporting and for an annual review of transactions. A source-month column keeps each row traceable to its file.

Related functions

All Power Query M functions · View as Markdown · M basics