Table.Combine Function (Power Query M)

Table.Combine takes a list of tables and stacks their rows into one combined table, the way a UNION appends data. Available in Excel (Power Query), Power BI Desktop, and Power BI Service.

If you have the same kind of data split across several tables, like one table per month or per region, and you want them in a single table, this is the function you reach for.

Syntax of Table.Combine Function

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

where

  • tables (required, list). The list of tables to stack, written inside {}. They are appended in the order you list them.
  • columns (optional, any). The set of columns the result should have, given as a list of names or a table type. Omit it and the result uses the union of all the input columns.

Returns: a single table whose rows are all the input rows stacked together. Columns are matched by name, and any column a table is missing is filled with null.

In plain terms, you hand it a list of tables and it returns one table with every row, one after another.

Example 1: Stack two tables of the same shape

You have two monthly order tables with the same columns and want them in one.

Here is the first query, JanOrders:

ProductUnits
Notebook12
Pen30

And the second query, FebOrders:

ProductUnits
Marker18
Eraser9

Put both tables in a list and combine them:

let
Jan = Excel.CurrentWorkbook(){[Name="JanOrders"]}[Content],
Feb = Excel.CurrentWorkbook(){[Name="FebOrders"]}[Content],
Combined = Table.Combine({Jan, Feb})
in
Combined

The rows from both tables are stacked in the order listed.

The result holds all four rows:

ProductUnits
Notebook12
Pen30
Marker18
Eraser9

January’s rows come first, then February’s, because that is the order in the list.

Example 2: Combine more than two tables

The list can hold as many tables as you need, so you can stack three regions at once.

Here is NorthSales:

RepDeals
Asha5
Ben7

Here is SouthSales:

RepDeals
Carl3

And here is WestSales:

RepDeals
Dana8
Ed2

List all three inside the {}:

let
North = Excel.CurrentWorkbook(){[Name="NorthSales"]}[Content],
South = Excel.CurrentWorkbook(){[Name="SouthSales"]}[Content],
West = Excel.CurrentWorkbook(){[Name="WestSales"]}[Content],
Combined = Table.Combine({North, South, West})
in
Combined

Every row from all three tables lands in one table.

The result has all five rows:

RepDeals
Asha5
Ben7
Carl3
Dana8
Ed2

There is no limit on how many tables you put in the list.

Example 3: Tables with different columns

When the tables do not share all their columns, the result keeps every column and fills the gaps.

Here is OnlineStock, which has an Item and a Color column:

ItemColor
MugBlue
CapRed

Here is StoreStock, which has Item and Price instead:

ItemPrice
Bottle15
Bag25

Combine them as usual:

let
Online = Excel.CurrentWorkbook(){[Name="OnlineStock"]}[Content],
Store = Excel.CurrentWorkbook(){[Name="StoreStock"]}[Content],
Combined = Table.Combine({Online, Store})
in
Combined

Columns are matched by name, so the result has Item, Color, and Price.

Each row gets null where its table did not have that column:

ItemColorPrice
MugBluenull
CapRednull
Bottlenull15
Bagnull25

The online rows have no Price, and the store rows have no Color, so those cells come back as null.

Example 4: Duplicate rows are kept

Table.Combine only appends. It does not remove rows that appear in more than one table.

Here is ListA:

MemberPoints
Liam100
Noah80

Here is ListB, where Noah shows up again with the same points:

MemberPoints
Noah80
Olivia60

Combine the two lists:

let
A = Excel.CurrentWorkbook(){[Name="ListA"]}[Content],
B = Excel.CurrentWorkbook(){[Name="ListB"]}[Content],
Combined = Table.Combine({A, B})
in
Combined

Both copies of the Noah row stay in the result.

The duplicate survives:

MemberPoints
Liam100
Noah80
Noah80
Olivia60

If you want to drop the repeat, wrap the result in Table.Distinct.

Things to keep in mind with Table.Combine

  • It appends, it does not join. This is a UNION (rows stacked on top of each other), not a lookup that matches rows side by side. To join tables on a key, use the Merge Queries command (Table.NestedJoin) instead.
  • The tables must be in a list. Wrap them in {}. Passing them as separate arguments throws Expression.Error: 2 arguments were passed to a function which expects 1.
  • Column order follows first appearance. The result lists columns in the order they first show up across the tables, so a column unique to a later table lands to the right of the shared ones. Pass the optional columns list if you need a specific order.

Performance and query folding

Appending file-based sources, like every CSV in a folder, is the most common use of Table.Combine, and that work runs locally rather than folding back to a server.

Even against a foldable source it generally does not fold, so on very large tables the append happens in Power Query’s engine. That is fine for typical workbook and folder data.

Common questions about Table.Combine

What is the difference between Table.Combine and Merge Queries?

Table.Combine appends rows, so the result gets taller (more rows, same columns). Merge Queries (Table.NestedJoin) matches rows on a key and brings columns side by side, so the result gets wider.

How do I combine every table in a folder?

Use the Folder connector to get a table of files, then append their contents with Table.Combine. The standard From Folder flow builds this step for you automatically.

List of All Power Query Functions

Related Power Query Functions / Articles:

I am a huge fan of Microsoft Excel and love sharing my knowledge through articles and tutorials. I work as a business analyst and use Microsoft Excel extensively in my daily tasks. My aim is to help you unleash the full potential of Excel and become a data-slaying wizard yourself.