Forum Discussion
klehar
2 years agoHelper V
Color Code matrix based on average value of Geos
Hi, I want to color code the measures data such that if a cell value > Average than show Green if it is less than Average than show as Red Data : Geo KPI Values North America % com...
- 2 years ago
Hi klehar,
Here is my solution:
My table:I added the "Order" column to sort the Geo as you have in your desired output.
In this table the Geo column is sorted by the olumn Order as you can see here:Measures I used:
Value Each Geo = MIN(T_DataGeo[Values]) -- To return each value that I have in the table. You need to adjust this measure according to your needs Avg KPY = CALCULATE( AVERAGE(T_DataGeo[Values]), ALLSELECTED(T_DataGeo[Geo], T_DataGeo[Order]) ) -- This measure returns the avegage to each KPY Color Measure = IF( [Value Each Geo] >= [Avg KPY], "GREEN", "RED" ) -- Return the colour according to the rules you mentioned
On the Cell elements apply a Background color for the measure "Value Each Geo":
Final Output:
_AAndrade
2 years agoResident Rockstar
As I said before I added this column to order Geo Country like you have in your tables.
Starts from North America to Europe otherwise we will have the standard alphabetic sort.
You can ignore them if you don't need that particular sort