Forum Discussion
Joseph_Hchaime
3 years agoHelper III
Conditional Formatting on Cell based on two conditions
Hi I have the below data example that I'm trying to apply conditional formatting on but I'm not able to do it. I tried creating two different rules but it didnt work. Basically I want the sa...
- 3 years ago
Joseph_Hchaime you can add a measure for the color and then use that in the conditional formatting:
Color = VAR __Amount = SUM ( Table[Amount] ) VAR __Location = SELECTEDVALUE ( Table[Location] ) RETURN SWITCH ( TRUE (), __Location = "NY" && __Amount >= 4000, "Green", __Location = "London" && __Amount >= 10000, "Red", __Location = "Dubai" && __Amount >= 6000, "Yellow" )
parry2k
3 years agoSuper User
Joseph_Hchaime you can add a measure for the color and then use that in the conditional formatting:
Color =
VAR __Amount = SUM ( Table[Amount] )
VAR __Location = SELECTEDVALUE ( Table[Location] )
RETURN
SWITCH ( TRUE (),
__Location = "NY" && __Amount >= 4000, "Green",
__Location = "London" && __Amount >= 10000, "Red",
__Location = "Dubai" && __Amount >= 6000, "Yellow"
)