Forum Discussion
Conditional Formatting for Min/Max Values in Matrix
- Anonymous5 years ago
This is the measure I ended up using and it worked perfectly as you can see below. (The table was slightly renamed since the original posting of this question.)
Here is the output, just as desired: (Q2 FY21 is now included as time has passed and the financials were finalized.) The numbers blacked out were excluded from the formatting by using the filters in the measure.
Hi Anonymous ,
You need to create the following measure:
Cond_Format =
VAR quarterselection =
SELECTEDVALUE ( 'Table'[QuarteR] )
VAR temp_table =
FILTER (
ALL ( 'Table'[FY], 'Table'[QuarteR], 'Table'[Value] ),
'Table'[QuarteR] = quarterselection
)
VAR mimminumvalue =
MINX ( temp_table, 'Table'[Value] )
VAR maximumvalue =
MAXX ( temp_table, 'Table'[Value] )
RETURN
SWITCH ( SUM ( 'Table'[Value] ), mimminumvalue, "Red", maximumvalue, "Green" )
Only thing that I'm missing is the filter for the Q2 - Q4 2021 is this based on the fact that the Q2 is not yet finish?
If you tell me the rule we only need to adapt.
- Anonymous5 years agoNot applicable
This is great help so far! I have added the measure and am struggling to choose this as the 'Based on Field' under the advanced controls of conditional formatting. There does not appear to be an issue with my measure, but I am assuming something has to be wrong. Can you help me see what it is?
- MFelix5 years agoSuper User
Hi Anonymous ,
To use color codes in measures tyou need to have the codes with an hashtag and the six digit code, on the first colour you only have "FF0000" you need to had the # so it would bve "#FF0000".
- Anonymous5 years agoNot applicable
Hello MFelix,
Thanks for the tip. I fixed this small error, and this measure is still greyed out when I try to select it as the 'Based on value' in conditional formatting. Any ideas on what to do now?