Forum Discussion
Incorrect Measure Total
- 2 years ago
It's because DAX doesn't add your rows above, instead it calulates the expression on the totals. Hence, you get 8,087.5. You need to iterate over your rows instead of looking at the totals.
Absolute Error 2 = SUMX(VALUES(Table1[PN]), [Absolute Error])
This article might be helpful for you in the future!
https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/
Hi agirlhasnoname ,
According to my tests, the measure you created is correct and you can get the results you want
I have created a new meaure based on the test data, you can try it and get the results you want.
MEDIAN VALUE = MEDIAN('Table'[VALUE])Absolute_Error =
SUMX(
VALUES('Table'[Category]),
ABS(
CALCULATE([MEDIAN_VALUE], ALLEXCEPT('Table', 'Table'[Category])) -
SUM('Table'[VALUE])
)
)
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Albert Anonymous
Thanks for the response. I'm trying to get 7,915 for the total absolute error not 8,087.50.
- Syk2 years agoResident Rockstar
It's because DAX doesn't add your rows above, instead it calulates the expression on the totals. Hence, you get 8,087.5. You need to iterate over your rows instead of looking at the totals.
Absolute Error 2 = SUMX(VALUES(Table1[PN]), [Absolute Error])
This article might be helpful for you in the future!
https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/- agirlhasnoname2 years agoNew Member
Syk thank you, that worked!