Forum Discussion
Z-Score calculation error in DAX?
Likely this part
Mean_Harm_Vulnerable =
CALCULATE(
AVERAGE('Outcomes Testing Data'[Grading_Numerical_Column]),
You would need to replace that with COUNTROWS across all categories.
I don't understand, lbendlin, sorry. I can't replace the CALCULATE with COUNTROWS because then I'm not getting the mean. But I also can't add in COUNTROWS because then it's too many arguments.
- v-nmadadi-msft1 year agoCommunity Support
Hi AC23VM,
Thanks for reaching out to the Microsoft fabric community forum.
The issue seems to come from a mismatch between what you're trying to measure and how the DAX is written. Right now, the calculation takes an average of numbers that were assigned to each grading category. But those numbers are just labels, not real values you can average in a meaningful way. So, the DAX treats them like actual measurements, which leads to incorrect results.
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards