Forum Discussion
Matrix Conditional Formatting based on Field Measure not working
Hi BeaudryL
I noticed that your [Standard_Deviation] was returning zero for every row.
Because I'm not very experienced with STDEVX.P(), I decided to check CHAT-GPT and found the following:
STDEVX.P expects a table with multiple values per group.
You're summarizing MENTORS[Clinician] in _MeansByClincian, but @Mean is only storing a single aggregated value per clinician.
This means _MeansByClincian has only one row per clinician, making STDEVX.P return zero (since standard deviation requires variation).
Fix: Calculate standard deviation at the response level, not at the aggregated mean level. Instead of summarizing means per clinician first, compute the standard deviation directly from MENTORS[Response.Value].
__SD CHAT-GPT =
CALCULATE(
STDEVX.P(
MENTORS,
MENTORS[Response.Value]
)
)
This, at least, doesn't return zero for each line. You'll have to do some checking.
Let me know if you have any questions.
(I'm not sure why it is wrapped in a CALCULATE, but I just copied it.)