top of page

You are learning Power Query in MS Excel

How to perform a left join, right join, or inner join in Power Query?

Power Query uses the concept of "Merge" to join tables. Here's how to perform left join, right join, and inner join:

1. Access the Merge Dialog:

- Select the table you want as the primary table (usually the one containing all the data you want to keep).
- Go to the "Home" tab and click on "Merge Queries."

2. Specify the Tables and Join Column:

- In the "Merge dialog box," under "Right table for merge," select the table you want to join with the primary table.
- Choose the column from each table that has matching values for the join.
- In the primary table, select the column on the left side of the dialog.
- In the right table, select the corresponding column on the right side.

3. Set the Join Kind:

- Here's where you define the type of join:
- Inner Join: Keeps only rows where there's a match in both tables (common values in the join columns).
- Left Outer Join: Keeps all rows from the primary table and matching rows from the right table. unmatched rows from the right table will have null values for the joined columns.
- Right Outer Join: Keeps all rows from the right table and matching rows from the left table. unmatched rows from the left table will have null values for the joined columns.
- Select the desired "Join Kind" from the dropdown menu.

4. Complete the Merge:

- Click "OK" to perform the merge based on your chosen settings.

5. Review and Rename Columns (Optional):

- Power Query will automatically create a new table with the merged data.
- You can review the joined columns and rename them for clarity if needed.

By following these steps and selecting the appropriate Join Kind, you can perform left joins, right joins, and inner joins in Power Query to combine data from different tables.

bottom of page