How do you perform an Inner Join in Power BI, and can you provide an example?

An Inner Join in Power BI is a method used to combine data from multiple tables based on a common key or column. This join type only includes records that have matching values in both tables, resulting in a smaller, more specific dataset. To perform an Inner Join in Power BI, you can use the “Merge Queries” function and select the tables to be joined, as well as the key or column to match on. As an example, if you have a table with customer information and another table with sales data, you can use an Inner Join to combine these tables and get a dataset with customer information and their associated sales records. This can help in analyzing customer behavior and identifying patterns in sales data.

Perform an Inner Join in Power BI (With Example)


The easiest way to perform an inner join between two tables in Power BI is to use the Merge Queries function in the Power Query Editor.

The following example shows how to do so in practice.

Related:

Example: How to Perform an Inner Join in Power BI

Suppose we have the following table in Power BI named data1 that contains information about the team name and points scored for various basketball players:

And suppose that we have another table named data2 that contains information about the team name and rebounds for various basketball players:

Suppose that we would like to perform an inner join in which we only keep the rows from both tables that have matching values in the Team columns.

To do so, click the Home tab along the top ribbon, then click the Transform data icon:

This will bring up the Power Query Editor.

Next, click the Merge Queries icon in the Combine group of the Home tab.

Then click Merge Queries as New from the dropdown menu:

In the new window that appears, choose data1 as the first table, choose data2 as the second table, and choose Inner as the Join Kind.

Power BI inner join

Once you click OK, the inner join will be performed:

Next, click the left and right arrows on the header of the data2 column. Then check the box next to Rebounds to indicate that this column should be the only one included from data2 in the final merged table:

Once you click OK, the Rebounds column will be shown from the data2 table:

Once you exit out of the Power Query Editor, a message box will appear that asks if you’d like to apply your changes.

Click Yes.

You will then be able to see the new table named Merge1 in the Table view:

Notice that only the rows in which the value from the Team column appeared in both tables are kept in the final merged table.

Note: If you’d like, you can right click on the header named data2.Rebounds and rename the column to just Rebounds.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

How to Add Index Column to Table in Power BI

x