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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Enkei
Frequent Visitor

Similar Tables and their relationships

Hello Everyone,

 

I have 3 tables , all of them have 98 rows and 6 columns but only 2 of the column datas are different. 

I want to find the difference in that 2 columns and plot a visual to see the difference. 

Also I want to create relationships between these tables (created from 3 csv files).

can someone please help????

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Enkei ,

 

If the other 4 columns are the same, you can also create a column to combine the 4 columns and create relationships based on the created columns.

 

Or use merge like so: Relationship in Power BI with Multiple Columns - RADACAD.

 

 

Best Regards,

Icey

 

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

 

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @Enkei ,

 

If the other 4 columns are the same, you can also create a column to combine the 4 columns and create relationships based on the created columns.

 

Or use merge like so: Relationship in Power BI with Multiple Columns - RADACAD.

 

 

Best Regards,

Icey

 

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

 

PC2790
Community Champion
Community Champion

Hello @Enkei ,

 

Can you please clarify your requirement in detail?

If the data structure is same, can't you consider appending these tables together and removng duplicates if it solves your purpose?

For your query to get the difference in two tables, here is the generic Power Query code:

 

let
    addedT1_= List.Difference(Table1[ID], Table2[ID]),
    addedT2_= List.Difference(Table2[ID], Table1[ID]),
    TChanges_ = Table.AddColumn(Table.SelectRows(Table.SelectRows(Table2, each not List.Contains(addedT2_, [ID])), each _ <> Table1{[ID = [ID]]}), "Change description", each "Change in table 2 compared to table 1", type text)
    
in
    TChanges_

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors