Forum Discussion
Changing Conditional Formatting Based on Rules
- 3 years ago
Which Date Field do you have on the report table? If you have anyone there you should try the approach below. If it works, kindly mark this as a solution to allow anyone who may have similar issues find it easily:
1. Create a Measure as:
IF(SELECTECTEDVALUE(DateTable[Quarter]) = "Q2" && [YourMeasure%] >= 0.25, 1,
IF(SELECTECTEDVALUE(DateTable[Quarter]) = "Q2" && [YourMeasure%] >= 0.20,1,
0))2. With the above Measure, create a Conditional Formatting using "Field Value" option. Set 1 to Green and 0 to Red
Which Date Field do you have on the report table? If you have anyone there you should try the approach below. If it works, kindly mark this as a solution to allow anyone who may have similar issues find it easily:
1. Create a Measure as:
IF(SELECTECTEDVALUE(DateTable[Quarter]) = "Q2" && [YourMeasure%] >= 0.25, 1,
IF(SELECTECTEDVALUE(DateTable[Quarter]) = "Q2" && [YourMeasure%] >= 0.20,1,
0))
2. With the above Measure, create a Conditional Formatting using "Field Value" option. Set 1 to Green and 0 to Red
ahmedoye Thank you so much! This ended up working, I just had to add an additional IF statement, as my table defaults to all dates, so I just added a 0.5 value and set that option to Gray in the Conditional Formatting.
My final measure was:
IF(SELECTEDVALUE('Date Table'[Quarter]) = BLANK(), 0.5,
IF(SELECTEDVALUE('Date Table'[Quarter]) <> "Q1" && [Percentage] >= 0.25, 1,
IF(SELECTEDVALUE('Date Table'[Quarter]) = "Q1" && [Percentage] >= 0.2, 1, 0)))