What Does Merge Queries Do in Power BI?

Cody Schneider10 min read

Merging queries in Power BI is how you combine two different tables into one, based on a column they both share. It's like doing a VLOOKUP in Excel or running a SQL JOIN, but with a user-friendly visual interface. This article will walk you through exactly how to merge tables, explain what each of the six different "join kinds" does, and give you practical tips to get it right every time.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Understanding Merge Queries: The Basics

In most businesses, your data isn't all in one neat file. You likely have sales information in one table, customer details in another, and product information in a third. To get a complete picture, you need to bring them together. That's what merging does: it adds columns from one table to another by matching values in a common column, often called a unique identifier or a "key."

For example, imagine you have a Sales table with ProductID and QuantitySold and a separate Products table with ProductID and ProductName. To create a report showing the names of the products sold, you'd merge these two tables using the ProductID column they share.

It's important not to confuse merging with appending queries. While they sound similar, they do opposite things:

  • Merge Queries: This adds new columns to a table. You start with two tables and end with one wider table. (e.g., adding product names to a sales list).
  • Append Queries: This adds new rows to a table. You start with two tables and end with one longer table. (e.g., combining January sales data with February sales data).

This tutorial focuses strictly on merging - making your tables wider by adding new, related columns.

How to Merge Queries in Power BI: A Step-by-Step Guide

Let's walk through a common business scenario. We have a simple Sales table and a Products table, and we want to create a new, combined report that includes the product names and their categories alongside the sales data.

Here are our two example tables:

Table 1: Sales

This table contains individual transaction records.

  • OrderID
  • ProductID
  • Quantity_Sold
  • SaleDate

Table 2: Products

This table is our product lookup list.

  • ProductID
  • ProductName
  • Category

Our goal is to add the ProductName and Category information from the Products table to our Sales table.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 1: Open the Power Query Editor

First, you need to be in the Power Query Editor, which is where all of Power BI’s data transformation magic happens. If you're not already there, go to the Home tab on the main Power BI ribbon and click Transform data.

Once you are in the Power Query Editor, make sure both your Sales and Products tables are loaded and visible in the queries pane on the left.

Step 2: Select "Merge Queries as New"

With the Sales table selected, navigate to the Home tab of the Power Query ribbon. In the Combine group, you’ll see the Merge Queries option. Clicking the small dropdown arrow reveals two choices:

  • Merge Queries: This modifies your currently selected (Sales) table by adding the new columns to it directly.
  • Merge Queries as New: This leaves your original tables untouched and creates a completely new, third table containing the merged results.

As a best practice, it's almost always better to choose Merge Queries as New. It’s a non-destructive approach that makes troubleshooting easier and keeps your original data sources clean. For this guide, we'll choose that option.

Step 3: Configure the Merge Dialog Box

A new dialog box will appear. Here's how to fill it out:

  1. From the first dropdown, select your primary or “left” table. In our case, this is the Sales table. You’ll see a preview of its data below.
  2. From the second dropdown, select the “right” table you want to get data from. This will be our Products table.
  3. Next, you need to tell Power Query which columns to match. Click on the ProductID header in the Sales table preview, and then click on the ProductID header in the Products table preview. The columns will highlight in green to show they've been selected as the matching keys. At the bottom of the dialog, Power BI will even tell you how many of the rows matched successfully - a fantastic little bit of instant validation.
  4. Now pull down the Join Kind menu. This is the most critical step and what gives you control over the merge results. For now, leave it as the default, Left Outer. We’ll cover what each join type means in the next section.

Click OK to perform the merge.

Step 4: Expand the New Column

Power Query will now create a new table (likely called Merge1), which looks just like your original Sales table but with one new column added at the end. This column is called Products (named after the table we merged with), and its cells simply contain the word [Table].

This structured column holds all the data from the Products table that corresponds to each row. To see it, you need to expand it.

  1. Click the expand icon (the two arrows pointing in opposite directions) on the Products column header.
  2. A dropdown will appear showing all the columns from the Products table. Select the columns you want to add to your Sales report. In our case, we'll select ProductName and Category.
  3. Important: Deselect the ProductID column here. Since we already have a ProductID column in our Sales table, we don't need to add it again.
  4. Untick the box that says Use original column name as prefix. If you leave this checked, your new columns will be named Products.ProductName and Products.Category, which is usually unnecessary.

Click OK. Your table now has two new columns, ProductName and Category, with the correct data pulled in for each sale.

Step 5: Load and Apply Your Changes

Your data is now successfully merged! All that's left to do is click Close & Apply on the Home tab of the Power Query Editor ribbon. Your new, combined table is now ready to use in your Power BI reports and dashboards.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

The Six Power BI Join Kinds, Explained

That Join Kind dropdown you saw in Step 3 is where the real power of merging lies. Understanding each of the six types allows you to precisely filter and shape your data during the merge process itself. Using our Sales-Products example, let's break them down.

1. Left Outer (All from First, Matching from Second)

This is the default and most commonly used join. It keeps every single row from your first (left) table and brings in any matching information it finds from the second (right) table. If a row in the left table has no match in the right table, the cells in the newly added columns will simply show null.

Example: It keeps all records from the Sales table. If there’s a sale for a ProductID that doesn't exist in the Products lookup table, the ProductName and Category for that row will be null.

2. Right Outer (All from Second, Matching from First)

This is the direct opposite of a Left Outer join. It keeps every row from the second (right) table and brings in any matching data from the first (left) table. If a product in your Products table was never sold, its corresponding sales data columns would be null.

Example: You could use this to find which products have never been sold. The result would list every product, and those without sales history would have null for OrderID and Quantity_Sold.

3. Full Outer (All Rows from Both)

A Full Outer join gives you everything from both tables. It keeps all rows from the left table and all rows from the right table. Where a match is found based on the key, the data is combined on the same row. Where there is no match, it will create empty rows filled with nulls for the columns from the table that didn’t have a match.

Example: The result would show every sale (even ones with bad ProductIDs) and every product (even unsold ones).

4. Inner (Only Matching Rows)

This is the most restrictive join. An Inner join only keeps rows where the key (ProductID) exists in both tables. Any rows from either table that don't have a matching key in the other table are discarded.

Example: This would only return the sales records for products that exist in your Products table. It's a great way to create a clean, validated data set by filtering out sales with typos or invalid Product IDs.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

5. Left Anti (Rows Only in First)

The "anti" joins are used for finding exceptions and mismatches. A Left Anti join looks at the left table and returns only the rows that did not have a match in the right table.

Example: Merging Sales with Products on a Left Anti join is an excellent way to perform data validation. The result would be a list of all sales from the Sales table that have an invalid ProductID that isn’t in the official Products table.

6. Right Anti (Rows Only in Second)

This is the opposite of the Left Anti join. It returns only the rows from the second (right) table that do not have a match in the first (left) table.

Example: Merging with a Right Anti join is the cleanest way to answer the question, "Which products from my Products list have never been sold?" It returns a simple list of unsold products.

Practical Tips for Merging Queries

  • Confirm Your Data Types: For a merge to work correctly, the columns you're matching on must be the same data type. A ProductID column set as a "Text" type will not match with a ProductID column set as "Whole Number." Always check this in Power Query first.
  • Case Sensitivity: By default, Power BI's merge operation is case-insensitive (e.g., 'ABC' will match with 'abc'). You can change this behavior in the Merge dialog's "Fuzzy merge options" if you need strict, case-sensitive matching.
  • Remove Unnecessary Columns First: Your queries will run faster if you remove columns you don't need before you merge. This keeps your model lean and efficient.
  • Understand Fuzzy Merging: In the Merge dialog, there’s an option to "Use fuzzy merging." This is a powerful feature for matching columns that have slight misspellings or variations, like "Microsoft Corp" vs. "Microsoft Corporation".

Final Thoughts

Merging queries is one of the most fundamental skills in Power BI. By joining tables together, you can transform disconnected datasets into a unified model that provides deep, comprehensive insights. Mastering the six join kinds gives you complete control, letting you build anything from clean, INNER-joined tables to ANTI-joined tables that quickly find errors in your data.

Of course, knowing how to do a join is just one step. Actually wrangling data across a dozen platforms can still be a huge time-sink. We created Graphed because we believe getting insights shouldn't require complex data prep. Our tool connects to sources like Salesforce, Shopify, and Google Analytics and handles all the data modeling and joining behind the scenes. You just ask questions in plain English - like "which campaigns drove the most Shopify revenue?" - and Graphed builds a live dashboard in seconds, freeing you up to act on your insights instead of just spending all your time building reports.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!