Forum Discussion
Matrix totals incorrect
Hi PBIuser_CZ - Can you try with HASONVALUE function to ensure correct calculations for subtotals and grand totals.
AverageMeasure =
IF (
HASONEVALUE ( DateTable[Year] ),
AVERAGE ( Sales[Value] ),
AVERAGEX (
VALUES ( DateTable[Year] ),
CALCULATE ( AVERAGE ( Sales[Value] ) )
)
)
replace with your existing tables and date table fields.Hope it will get resolve the issue with incorrect subtotals and totals in your matrix visual.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Hi rajendraongole1 ,
thank you for your reply. The thing is that the average is calculated as a number of entered cases divided by number of working days:
- Anonymous2 years agoNot applicable
Your solutions is great rajendraongole1
Hi, PBIuser_CZ
You may want to consider doing this:
MEASURE = IF( HASONEVALUE (DateTable[Year]), [Your MEASURE of average]ļ¼ CALCULATE ([Your MEASURE of average],VALUES (DateTable[Year])) )This is an improvement over the workaround provided by rajendraongole1.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- PBIuser_CZ2 years agoFrequent Visitor
Hi Anonymous ,
thank you for your reply. Unfortunatelly this formula does not work, the numbers are still the same
ā
I am sending sample in pbix file as the original file is very complex.
In subtotals I would like to have average of the year and in the grand total I would like to have average of all visible values.
Thank you very much, I appreciate your help
- PBIuser_CZ2 years agoFrequent Visitor
Well, I think the link is not working. Can you please advice how to attach the .pbix file?
Thank you so much