Forum Discussion
Conditional formatting within the measure
Hi all...
Got a simple ask if the difference between 2 data point is < then background color is red else green. I wish to do this all within the measure. Please see below sample.
VAR _diffFTECount = _FTECountCurrentYear - FTECountPreviousYear
VAR _result =
SWITCH (
SELECTEDVALUE ( 'Static'[Metrics] ),
"FTE Count", _diffFTECount < 0,"#ffc7ce","#c6efce",
)
RETURN
_result
2 Replies
- vanessafvgCommunity Champion
not really clear on what you asking, where are you trying to use this measure, what visual.
in the formatting area of your visual you should be able to select the measure you have created and select it under field value.
- Tevon713Helper V
I understand what you shared but because the measure was build in specific ordering of metrics I couldn't find a work around it.
Here my earlier post where this was derived from..
https://community.powerbi.com/t5/Desktop/Display-table-in-matrix/m-p/3103239#M1051919