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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Many to many relationship workaround

Hello PBI community, 

I have a simple problem around many to many relationship that i'm not able to solve. Please find below a simplified illustration of the problem :

Fact Table

Financial Item     Amount     
Revenue100
Revenue80
Cost of Sales-20

 

P&L Layout

P&L Structure     Financial Item     
RevenueRevenue
Cost of SalesCost of Sales
Gross ProfitRevenue
Gross ProfitCost of Sales

 

I want to create a recap of the Amount by the field "P&l Structure". 

 

Output

P&L Structure     Amount     
Revenue180
Cost of Sales-20
Gross Profit160

 

To make that, i have a many to many relationship betwenn the two table on the column Financial Item.

 

-> I would like to find a way to model that in order to delete my many to many relationship without using DAX if possible.

 

I would be very glad if someone can help.

 

Kind regards

5 REPLIES 5
Anonymous
Not applicable

Hello @lbendlin , thanks for the reply. However, the example you provided has a many to many relationship, which is exaclty what I want to avoid 😁.

And why would you want to avoid it?

 

An alternative would be to not use a data model (ie use disconnected tables) and LOOKUPVALUE or TREATAS. I would consider these inferior.

Anonymous
Not applicable

I want to avoid it for performance issue. I also want to avoid TREATEAS or LOOKUP for the same reason. I gave a little example example but in reality, I have a model with around 80 tables, hundreds millions of rows in the fact table, so many to many relationship has to be avoid as much as possible.

There is no such thing as free lunch. Somewhere you will have to do the computation (and absorb the cost) - either in Power BI, or in the upstream system.  The further upstream you do it the more you lose flexibility.

 

Keep in mind that Vertipaq runs in memory.  Even with millions of rows performance should be acceptable.

lbendlin
Super User
Super User

see attached

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.