Do you know how to combine two tables in Power BI? In this Power BI tutorial, we will learn what does mean by Power BI combine tables and how to combine two tables in Power BI.
Also, we will discuss how to combine two tables using Power BI DAX with a simple scenario.
Power BI combine Tables
Power BI combines tables, which means you can create and combine information from two or more tables.
Let’s imagine you have one table with information about Customers and another with Order details about their purchases. A combined table will help you merge these two tables and provide a single table with customer information and their corresponding purchases.
How to Combine Two Tables in Power BI
Let’s see how we can combine or merge two tables in Power BI.
NOTE:Before we merge tables in Power BI, first we need to create two tables in Power BI. If you are new to Power BI, check out a detailed post on how to create a table in Power BI.
Here, I have created a two-table: Customer details and Order details.
We will get the result below after combining the two tables (Customer details and Order details).
Now, I will show you step-by-step how to merge two Power BI tables:-
1. Click the Transform data under the Home tab.
2. In Power Query Editor, Click Merge Queries as New under the Merge Queries drop-down.
3. In the Merge dialog box, choose the Table names and columns and click the “OK” button.
4. After clicking the OK button, you’ll see that the two tables have been merged and combined into a new table.
5. Expand the specific column and choose the columns you want to display in the merged table. In this case, I will expand the Order details and select Product ID, Product, Selling Price, Product Cost, and Quantity.
6. The screenshot below shows that the values have been expanded and displayed. Now, click on the “Close and Apply” option to save the changes
This is the process of merging two different tables in a Power BI.
Combine Tables in Power BI DAX
Here, we will see how to combine tables in Power BI DAX. I am using two tables, i.e., Products 1 and Products 2.
After combining two tables in Power BI DAX, our table is like this:
I use the UNION() DAX formula to combine two tables. Now, I will show you how to combine two tables using DAX.
1. Select the Table view -> Click New table under the Home tab.
2. Under the formula bar, put the below formula, then click commit:
Combine Table = UNION('Products 1','Products 2')
- Combine Table = New Table Name.
- UNION = Function Name.
- Products 1 & Products 2 = Existing Table Names.
3. Now, your new Power BI table has been ready to use.
In this way, you can combine tables using Power BI DAX.
I hope you follow the above steps to combine tables in Power BI. In this tutorial, we learned how to combine two tables and how to combine two tables using Power BI DAX.
Also, you may like some more Power BI tutorials:
- Create a Power BI Pie Chart? + Formatting
- Create a Report from Excel in Power BI
- How to Create a Report from SharePoint List in Power BI
- Export Power BI to Excel
- How to Create a Date Table in Power BI?
Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.