Forum Discussion
Inconsistent Sum/Total in Matrix
- 1 year ago
Hi Msampedro ,
Thanks for getting back. Yes, the main issue was due to how the many-to-many relationship between the Net Sales and Mapping tables allows a single material to be associated with multiple layers. This causes the matrix visual to re-evaluate the total across all matching combinations, including ones not directly visible in the row-level breakdown - which results in a higher total.
To fix this, here is a measure that explicitly sums Net Sales per unique Material–Layer combination from the Mapping table.
Net Sales (Fixed Total) = SUMX( SUMMARIZE( 'Mapping', 'Mapping'[Material], 'Mapping'[Layer] ), CALCULATE(SUM('Net sales'[Net Sales])) )This forces the matrix to total exactly what is shown in the rows, avoiding the context from the many-to-many relationship. With this change, the matrix total now becomes 29.73M.
Hope this helps. Please reach out for further assistance.
Please find the attached .pbix for reference.
Thank you.
Hi Msampedro ,
Just checking in to see if you query is resolved. If further assistance is needed, please reach out. Please share the DAX measure you're using along with a small sample dataset or mock PBIX file
Thank you.
- Msampedro1 year agoHelper I
Hi v-veshwara-msft MFelix ,
Thanks for your prompt response.
I am trying to share a mock PBIX file but the file type (.pibx) is not supported. Do you know how I can share the file with you?
Thanks,
Miguel
- v-veshwara-msft1 year agoCommunity Support
Hi Msampedro ,
Thanks for getting back.You can upload the mock PBIX file to a cloud storage service like OneDrive, Dropbox, Google Drive, or WeTransfer, then share the link here. Just make sure the link has the right access permissions so others can view or download the file.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
- Msampedro1 year agoHelper I
Thanks. Please see below the link:
https://drive.google.com/drive/folders/1-OWDXovMOrAsn0nwPt3nkxZv2ecHfaVF?usp=sharing
Regards,
Miguel
- MFelix1 year agoSuper User
You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.