When working with multiple datasets, you often need to combine related information from different tables. Merge Queries in Power Query allows you to join two or more tables based on a common column, similar to SQL joins.
For example, imagine you have:
- A Sales table containing Product IDs and Sales Amount.
- A Products table containing Product IDs and Product Names.
Using merge queries, you can combine these tables to display the product name alongside each sales record.
What is Merge Queries?
Merge Queries is a Power Query feature that combines columns from two tables using a common key or matching column.
It works similarly to SQL JOIN operations such as:
It works similarly to SQL JOIN operations such as:
- Inner Join
- Left Outer Join
- Right Outer Join
- Full Outer Join
Example
Sales Table
| Product ID | Sales Amount |
|---|---|
| P101 | 500 |
| P102 | 800 |
| P103 | 650 |
Product Table
| Product ID | Product Name |
|---|---|
| P101 | Laptop |
| P102 | Mouse |
| P103 | Keyboard |
After Merge
| Product ID | Product Name | Sales Amount |
|---|---|---|
| P101 | Laptop | 500 |
| P102 | Mouse | 800 |
| P103 | Keyboard | 650 |
Steps to Merge Queries
- Open Power Query Editor.
- Select the first table.
- Click Home → Merge Queries.
- Select the second table.
- Choose the matching column in both tables.
- Select the required join type.
- Expand the merged columns.
- Click Close & Apply.
Types of Merge Joins
- Inner Join – Returns matching rows only.
- Left Outer Join – Returns all rows from the first table and matching rows from the second table.
- Right Outer Join – Returns all rows from the second table and matching rows from the first table.
- Full Outer Join – Returns all rows from both tables.
- Left Anti Join – Returns rows only from the first table.
- Right Anti Join – Returns rows only from the second table.
Why Use Merge Queries?
- Combines related tables
- Enriches datasets with additional information
- Reduces manual data entry
- Simplifies reporting
- Supports relational data modeling
Best Practices
- Use matching data types for join columns.
- Merge using unique keys whenever possible.
- Remove unnecessary columns after merging.
- Verify the selected join type before applying changes.
Conclusion
Merge queries combine columns from related tables using a common key. It helps create richer datasets and is widely used for preparing data before building reports and dashboards in Power BI.




