Forum Discussion
PBIuser_CZ
2 years agoFrequent Visitor
Matrix totals incorrect
Hello, I have a matrix with measure which is calculated average. I have years 2023 and 2024 in columns, the subtotal for 2023 is correct but subtotal for 2024 and Total is incorrect - there are t...
hackcrr
2 years agoMemorable Member
Hi, PBIuser_CZ
Perhaps you could try the following Dax expression
Garance Retail - Corrected Average =
IF(
HASONEVALUE('Date'[Month]),
[Garance Retail - average],
AVERAGEX(
FILTER(
VALUES('Date'[Month]),
NOT(ISBLANK([Garance Retail - average]))
),
[Garance Retail - average]
)
)
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution and kudos to this post to help the other members find it more quickly
PBIuser_CZ
2 years agoFrequent Visitor
Hi hackcrr,
this is almost what I needed! But the Grand Total is still incorrect. I have tried to edit the code but I got still the same result. I have even no idea what it is calculating...
The result for the first row should be 0,79 (sum of all values divided by number of months with value)
Is it even possible to achieve it?