Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
Could you please help and explain what I'm doing wrong here?
I've got a two tables with relation based on column "Product Family". Let's assume they both looks:
when I'm building an overview I receive:
How to change this?
Solved! Go to Solution.
Hi @Lesny,
The issue in your Power BI report can be due to a many-to-many relationship between Table 1 and Table 2, both of which are related on the Product Family column. Here's how to fix and address the problem step by step:
Possible Reason for the Incorrect Totals
Possible Fixes and Solutions
Option 1: Use a Bridge Table
ProductFamilyBridge = DISTINCT(
UNION(
SELECTCOLUMNS(Table1, "Product Family", Table1[Product Family]),
SELECTCOLUMNS(Table2, "Product Family", Table2[Product Family])
)
)
Define Relationships:
Remove the direct relationship between Table 1 and Table 2.
Connect Product Family in Table 1 to Product Family in Product Family Bridge.
Connect Product Family in Table 2 to Product Family in Product Family Bridge.
Update Your Matrix:
Use the Product Family field from the Product Family Bridge table in your visual.
Add Sales from Table 1 and Costs from Table 2.
This ensures Power BI aggregates the data correctly without duplication.
Option 2: Use a Composite Model with Measures
If you prefer to avoid creating a bridge table, you can handle the relationship via explicit measures:
TotalCosts = SUM(Table2[Cost])
Use These Measures in Your Matrix:
Add Product Family from either table to your matrix.
Use TotalSales and TotalCosts as the values.
Power BI will correctly compute totals without inflating them.
Option 3: Use the Country Field for Additional Granularity
If Country is important for your analysis, ensure relationships also consider Country:
ProductCountryKey = 'Table'[Product Family] & "-" & 'Table'[Country]
I hope the provided multiple options works for you
If I have resolved your question, please consider marking my post as a solution. Thank you!
A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.
Why are your tables with the same structure separate?
Proud to be a Super User!
Hello. The whole structure is not the same. I simplified the table to show the problem.
Hi @Lesny,
The issue in your Power BI report can be due to a many-to-many relationship between Table 1 and Table 2, both of which are related on the Product Family column. Here's how to fix and address the problem step by step:
Possible Reason for the Incorrect Totals
Possible Fixes and Solutions
Option 1: Use a Bridge Table
ProductFamilyBridge = DISTINCT(
UNION(
SELECTCOLUMNS(Table1, "Product Family", Table1[Product Family]),
SELECTCOLUMNS(Table2, "Product Family", Table2[Product Family])
)
)
Define Relationships:
Remove the direct relationship between Table 1 and Table 2.
Connect Product Family in Table 1 to Product Family in Product Family Bridge.
Connect Product Family in Table 2 to Product Family in Product Family Bridge.
Update Your Matrix:
Use the Product Family field from the Product Family Bridge table in your visual.
Add Sales from Table 1 and Costs from Table 2.
This ensures Power BI aggregates the data correctly without duplication.
Option 2: Use a Composite Model with Measures
If you prefer to avoid creating a bridge table, you can handle the relationship via explicit measures:
TotalCosts = SUM(Table2[Cost])
Use These Measures in Your Matrix:
Add Product Family from either table to your matrix.
Use TotalSales and TotalCosts as the values.
Power BI will correctly compute totals without inflating them.
Option 3: Use the Country Field for Additional Granularity
If Country is important for your analysis, ensure relationships also consider Country:
ProductCountryKey = 'Table'[Product Family] & "-" & 'Table'[Country]
I hope the provided multiple options works for you
If I have resolved your question, please consider marking my post as a solution. Thank you!
A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.
Thank you. Solution 1 and 3 helped 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
104 | |
69 | |
48 | |
41 | |
34 |
User | Count |
---|---|
164 | |
111 | |
62 | |
53 | |
38 |