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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
metcala
Helper III
Helper III

Data structure - Many to many relationship requirement?

Hi all

 

Just after some advice for best practice establishing relationships in a PowerBI model.

 

I have a 'Open Cases' table (see below) which is refreshed monthly. I also have a 'Narratives' table (see below) with a many to many relationship as there can be multiple updates on a particular case and if the case is open for multiple months it will appear multiple times on the 'Open Cases' table.

 

Open Cases

 

Reporting MonthCase IDCategoryAssigned toExpected Close
...............

 

 

Narratives

 

IDUpdate DateUpdated byNarrative
............

 

 

This does give me what I need but just want to explore whether there would be a better way to build this relationship.

 

Thanks

1 ACCEPTED SOLUTION
mlsx4
Super User
Super User

Depending on the size of both tables, you may consider the option to create a "Bridge table". Otherwise, you might miss pieces of data that, later on, could impact on your results. You can check this article: https://www.seerinteractive.com/insights/join-many-many-power-bi

 

View solution in original post

3 REPLIES 3
mlsx4
Super User
Super User

Depending on the size of both tables, you may consider the option to create a "Bridge table". Otherwise, you might miss pieces of data that, later on, could impact on your results. You can check this article: https://www.seerinteractive.com/insights/join-many-many-power-bi

 

Thanks for the response.

 

Just been having a look into bridge tables and looks like an good option. I'm just struggling to rationalise it in my head am i correct in thinking it would be something like this...

 

Open Cases

 

Reporting MonthCase IDCategoryAssigned toExpected Close
1/1/23123AJS31/12/23
1/1/23124APJ31/10/23
1/2/23123AJS31/12/23
1/2/23125BSP31/12/23

 

Narrative

 

IDUpdate DateUpdated byNarrative
1235/1/23AKTest underway
12328/1/23AKTest completed
12429/1/23JMInvestigation brief
12331/1/23AKAssessment write up

 

Bridge

 

ID

123

124

125

 

Hopefully my understanding is correct.... is it in effect checking for unique values in each table listing in the bridge table and allowing a many-to-one relationship from Open Cases to Bridge and Narratives to Bridge?

Yes, you have done it right. Should work for checking the values!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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