Table.Join

Table

Joins two tables on key columns, returning a flat combined table.

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

Syntax

Table.Join(table1 as table, key1 as any, table2 as table, key2 as any, optional joinKind as nullable number, optional joinAlgorithm as nullable number, optional keyEqualityComparers as nullable list) as table

Parameters

NameTypeRequiredDescription
table1tableYesThe left table.
key1anyYesThe join key column name (text) or list of column names for table1.
table2tableYesThe right table.
key2anyYesThe join key column name (text) or list of column names for table2.
joinKindnumberNoJoin type: JoinKind.Inner (0, default), LeftOuter (1), RightOuter (2), FullOuter (3), LeftAnti (4), RightAnti (5).
joinAlgorithmnumberNoAlgorithm hint for performance tuning.
keyEqualityComparerslistNoCustom comparers for key matching (e.g., case-insensitive).

Return Value

tableA table containing columns from both inputs joined on the specified keys.

Remarks

Table.Join is a flat join — it returns a single table with all columns from both inputs side by side, similar to a SQL JOIN. If both tables share a column name (other than the key), the duplicate is renamed with a suffix (e.g. CustomerID.1).

For most Power Query workflows, Table.NestedJoin followed by Table.ExpandTableColumn is preferred because it gives finer control over which columns to expand and avoids automatic column renaming. Use Table.Join when you want a flat result immediately and don't mind resolving column name collisions manually.

When both key columns have the same name, M retains the left table's key and renames the right table's key with .1. Rename or drop the duplicate before exposing the result downstream.

Examples

Example 1: Inner join Sales to Customers

let
    Joined = Table.Join(Sales, "CustomerID", Customers, "CustomerID", JoinKind.Inner),
    Result = Table.SelectColumns(Joined, {"OrderID", "CustomerID", "Amount", "Name", "Country"})
in
    Result
Applied Steps

The final output — selects only the five desired columns (OrderID, CustomerID, Amount, Name, Country) from the joined table, dropping duplicate and unwanted columns.

OrderID
CustomerID
Amount
Name
Country
11C001250Alice JohnsonUSA
22C002120Bob SmithCanada
33C00175Alice JohnsonUSA
44C003500Carol DavisUSA
55C00290Bob SmithCanada
66C004200David LeeUK
77C001350Alice JohnsonUSA
88C003160Carol DavisUSA

Example 2: Left anti-join to find unmatched rows

Table.Join(Sales, "CustomerID", Customers, "CustomerID", JoinKind.LeftAnti)
Output
OrderID
CustomerID
Amount
Region
Status

Compatibility

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