Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Comparison of Tables

I have the following 4 tables, the sales value in which I need to comapre:

 

Leihan_55_0-1707860725276.png

 

As seen, all columns are similar except for the sales one. Now I created an extra column in each of these tables by merging the similar columns and calling it KEY. Then, I created a new table with just the common columns and called it my master table. The KEY in the master table has a relationship many-to-one to the KEY columns in each of the other tables. In the master table, I've also created certain measures to perform some calculations. 

 

My aim is to create a table/matrix visual with the above common columns and the subequent columns will be sales' data from Extract A01, Extract A02 ..... But each row shows the total and the measures don't seem to work. 

 

I've tried it many ways. By creating and removing tables, by creating and deleting relationships, but nothing seems to work.

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

Hello @Anonymous 

why dont you append the 4 tables into one consolidated table from power query. 

 

you can add a new column into each extract, specifying the extract number, 

and then append . 

 

if this doesnt work for you, could you please share w visual presentation of the desired output ? 

 

best regards,

 

 

View solution in original post

4 REPLIES 4
v-xuxinyi-msft
Community Support
Community Support

Hi @Anonymous 

You can try this method as follows.

 

Use Merge Queries:

vxuxinyimsft_3-1708416181842.png

 

vxuxinyimsft_0-1708415658823.png

 

Expand the table:

vxuxinyimsft_1-1708415704476.png

 

Use the above method to merge other tables.

 

Output:

vxuxinyimsft_2-1708416024262.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-xuxinyi-msft Thank you for the reply. I'll definitely try this method, but fo now, appending the tables has done it.

Daniel29195
Super User
Super User

Hello @Anonymous 

why dont you append the 4 tables into one consolidated table from power query. 

 

you can add a new column into each extract, specifying the extract number, 

and then append . 

 

if this doesnt work for you, could you please share w visual presentation of the desired output ? 

 

best regards,

 

 

Anonymous
Not applicable

Hello @Daniel29195 

 

Thank you for the response. Here is my desired output.

Leihan_55_0-1707901167133.png

Please note that the above and what I've shared before are mock data, hence the tables are so short. My datasets are huge with around 170 columns and thousands of rows. And they keep updating. All columns are similar and have similar names and identifier values, except for the columns that have sales or such data (though the columns names are still the same). For the desired output, there must be proper relationships between the tables so I can use slicers with identifier data. (for instance, slice per product, per plant, per cutomer etc.).

 

I just hope appending all the four datasets doesn't crash Power BI. I'll give a shot to what you're suggesting, but if you can think of another solution as well, that'd be highly appreciated. Thanks.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.