Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have created a switch to apply conditional formatting in table and trying to enable both at a same time. but one switch is not working if I enable the other one.
eg :
For 1st switch it is blue() and for 2nd switch it is grey, even I enabled both I am unable to see the conditional formatting for 2nd switch.
If($(vSwitch1)='Switch1',IF(SUM(Sales)>0 AND SUM(Sales)<100, RGB(201,218,248)),
IF($(vSwitch2)='Switch2',IF(SUM(Sales)=0,RGB(192,192,192))))
Hi @Cbhuvi27 ,
the current expression is evaluating vSwitch1 and, if it is 'Switch1', it applies the first condition, but it doesn't leave room for the second condition to be evaluated unless the first one fails. You need to adjust the logic so that both conditions can be evaluated independently.
Try this:
IF(
$(vSwitch1) = 'Switch1' AND SUM(Sales) > 0 AND SUM(Sales) < 100,
RGB(201,218,248),
IF(
$(vSwitch2) = 'Switch2' AND SUM(Sales) = 0,
RGB(192,192,192),
// Default color if no conditions are met
'black'
)
)