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
ecoast16
Frequent Visitor

Modeling help for many-to-many relationship

 Scenario: Our app/database holds bank loans, and many lenders can be assigned to one loan, and many loans can be assigned to one lender. A pretty classic many-to-many set-up I think. What we need our model to do is:

Track how much each lender is allocated to each loan. We have the loan data, and the allocation for each loan by lender. We are pulling the data from our transactional DB, passing it through ETL and staging in Snowflake, so we have some flexibility in how we model it.

 

In the attached .pbix I have modeled two scenarios:

 

Scenario 1: store the notional for each loan at the allocation grain. This seems to work ok, but not sure I love have multiple records for each loan, when its really just one loan allocated out.

 

Scenario 2: using a bridge table, and creating a lender group, which is an ID assigned to every unique group of lenders. I stole this design from here (https://www.nuwavesolutions.com/bridge-tables-deep-dive/), but then not sure how to write measures to show loans allocated, it seems like the joins might have to be bi-directional, or use crossfilter in the measure?

 

The last wrinkle: the lender allocation mix can change over time, where some lenders might drop or others be added, or the lenders say the same and the percentage changes, so also trying to figure out where to best to incorporate the slowly changing dimension as well.

 

Any guidance would be appreciated!

 

https://drive.google.com/file/d/1DWsBDk_U2nHQOUB8pbxZ9KF6JHvc86lf/view?usp=sharing

1 REPLY 1
v-eqin-msft
Community Support
Community Support

Hi @ecoast16 ,

 

Sorry for that the information you have provided is not making the problem clear to me.

 

There are too many tables in your pbix file and professional vocabulary which make me a little confused.🤔

It is suggested provide more concise sample data and show me the final expected output you want.

 

Please firstly refer to this blog on How to Get Your Question Answered Quickly 

 

Refer to:

https://exceleratorbi.com.au/many-many-relationships-dax-explained/

https://docs.microsoft.com/en-us/power-bi/guidance/relationships-many-to-many

https://community.powerbi.com/t5/Desktop/DAX-RELATED-with-MANY-TO-MANY-RELATIONSHIP/m-p/606638

 

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

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.