Forum Discussion
Zyg_D
6 years agoContinued Contributor
Comparing to category average
I have the 3 first columns, and I want to get the blue one. The values are obtained by comparing grades to grade averages of each area. How to do it?
- 6 years ago
Hi Zyg_D ,
Try this one:
Column =VAR _avg = CALCULATE(AVERAGE('Table (2)'[Grade]); FILTER('Table (2)'; 'Table (2)'[Area] = EARLIER('Table (2)'[Area])))RETURN IF('Table (2)'[Grade] < _avg; "Below Average";IF('Table (2)'[Grade] = _avg; "Average";"Above Average"))This column is static, if you need it dynamically you can use this link as reference:Did I answer your question? Mark my post as a solution!
Ricardo
camargos88
6 years agoCommunity Champion
Hi Zyg_D ,
Try this one:
Column =
VAR _avg = CALCULATE(AVERAGE('Table (2)'[Grade]); FILTER('Table (2)'; 'Table (2)'[Area] = EARLIER('Table (2)'[Area])))
RETURN IF('Table (2)'[Grade] < _avg; "Below Average";
IF('Table (2)'[Grade] = _avg; "Average";
"Above Average")
)
This column is static, if you need it dynamically you can use this link as reference:
Did I answer your question? Mark my post as a solution!
Ricardo
Ricardo