In this Power BI tutorial, we will learn how to merge tables in Power Bi and also will see how to merge tables with different columns in Power Bi. In addition, we will also cover how to merge tables using Power Bi Dax.
How to Merge Tables in Power BI
Here we will see how to merge two tables in Power Bi. In this example, we are going to use the Team Appearances Table consists of two tables called Team A and Team B as below:
Team A:
Team B:
- Load the data using the get data option into Power Bi desktop. Then click on transform data from the ribbon on the power bi desktop, it will redirect to the power query editor.
- In the Power Query editor, choose the Merge queries option. In the merge query, pop-up window choose the Table names and columns and click on the Ok button.
- Once you click on the OK button, you can see that the two queries have been merged and combined into a new table.
- Then Expand the column and select the column you want to display in the merged table, here I will expand the Team B members count.
- In the below screenshot, you can see that the value has been expanded and displayed as below: Now click on the close and apply the option to save the changes.
This is how to merge two different tables in the Power Bi report.
Merge tables in power bi with different columns
Let us see how we can add the merge table in Power Bi with different columns in Power Bi.
- Load the data using get data into the Power Bi desktop. Then click on transform data from the ribbon on the power bi desktop, it will redirect to the power query editor.
- In the Power Query editor, choose the merge queries option. We can select different columns with the same data type value.
- In the merge query, pop-up window choose the Table names and columns and click on the ok button.
- Once you click on OK, merge the two queries and create a new table.
- Then Expand the column and select the column you want to display in the merged table.
- In the below screenshot, we can see that it displays the team names for the selected value, and for the unmatched values, it displays the null value.
- Now click on the close and apply the option to save the changes.
This is how to add the merge table in Power Bi with different columns in Power Bi.
How to merge two tables in power bi using Dax
Here we will see how to merge or combine two tables using the Power Bi Dax.
- Load the data using get data into the Power Bi desktop. under the modeling, tab clicks on the new measure and apply the below-mentioned formula:
Merged Table = UNION('Team A','Team B')
Where,
- Merged Table = New Table Name
- UNION = Function Name
- Team A & Team B = Existing Table Names
The screenshot below displays the newly merged data table values in the Power Bi data section.
This is how to merge or combine two tables using DAX in Power Bi.
This Power Bi tutorial clearly demonstrated how to merge tables in Power Bi and also how to merge tables with different columns in Power Bi. In addition, we also covered how to merge tables using Power Bi Dax.
You may like the following power bi tutorials:
- How To Remove Filter From Power BI DAX
- How to Filter Power BI Dax Based On Condition
- Power BI DAX Filter Table
- How to add column from another table in Power BI
- Power BI Distinct Count with filter
- Power BI Percentage of Total by Category
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com