Forum Discussion
meging two tables
- 1 year ago
Use Merge Queries
Select all the columns you need to match each row with exactly one other row by ctrl-click.
Make sure the match column numbers align:Then press OK and in the resulting column, select the Expansion Marker
And select the column you want to add to your table:
Did I answer your question? Then please mark my post as the solution and make it easier to find for others having a similar problem.
If I helped you, please click on the Thumbs Up to give Kudos.Kees Stolker
A big fan of Power Query and Excel
- 1 year ago
Hi umairarshad,
Thank you for reaching out to Microsoft Fabric Community.
To merge two tables and have the Hrs and Total Consumption columns side by side, please follow below approach:
- Open Power BI Desktop and load the two tables.
- Go to the Home tab and click Transform Data, this opens the Power Query Editor window
- Select the first table and click the Merge Queries drop down and then select Merge Queries as New
- A new window will open, from there select the first table in first dropdown and second table in the second drop down and then select any matching column from two tables for eg., Month and from the Join Kind select the Left Outer join and click OK like below
- A new Table will be created, from that table from the Hours column click on the Expand icon
- From the Expand area select only the Hrs column and click on OK
- The Hours will be displayed next to the Total Consumption column like below
- Rename the Table name and column name’s as per your requirement and from the Home Tab click on Close and Apply in the top-left corner of Power Query Editor.
- The combined table will now be available in your Power BI data model
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank and regards,
Anjan Kumar Chippa
Use Merge Queries
Select all the columns you need to match each row with exactly one other row by ctrl-click.
Make sure the match column numbers align:
Then press OK and in the resulting column, select the Expansion Marker
And select the column you want to add to your table:
Did I answer your question? Then please mark my post as the solution and make it easier to find for others having a similar problem.
If I helped you, please click on the Thumbs Up to give Kudos.
Kees Stolker
A big fan of Power Query and Excel
- umairarshad1 year agoHelper II
Great man. It worked. Thanks a lot.