Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a matrix visual that breaks down average cost by product name, product code, and batch code. My problem is that the avg cost values for the lot code and product code are being summed at the product name level, which is incorrect.
For example, I'd like the value for 535C11 (48919) to be the average of the batch codes below it (roughly 1.6). I'd then like to sum the averages of the 2 '535C11' values at the top level where it says 'ARISTONATE'.
Average cost is being calculated like this:
A measure in a matrix visual is calculated four times, for the individual cells, the row totals, the column totals, and for the grand total. You can adjust your calculation accordingly, using HASONEVALUE to figure out where in the matrix you are .
Please provide sanitized sample data that fully covers your issue. I cannot help you without usable sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 60 | |
| 44 | |
| 40 | |
| 37 | |
| 21 |
| User | Count |
|---|---|
| 178 | |
| 127 | |
| 116 | |
| 77 | |
| 54 |