Forum Discussion
Anonymous
2 years agoNot applicable
Switch Selected Value for no selected value
So I have a working switch statement for a selected value, with two options, but I was wondering if I could get a third switch statement working for if neither option is selected.
the Slicer has option A and B, so I want my formula to work for A and B and neither option pressed.
Currently I have:
SWITCH(SELECTEDVALUE(Choice),"A",SUM(X),"B",sum(Y),"",SUM(Z))
so I have tried with "" but when I press no options on the slicer, nothing appears in the graph, can anyone please advise?
Hi Anonymous could you please try this
SWITCH(
TRUE(),
SELECTEDVALUE(Choice) = "A", SUM(X),
SELECTEDVALUE(Choice) = "B", SUM(Y),
TRUE(), SUM(Z)
)
3 Replies
- ravsha85Frequent Visitor
Hi Anonymous could you please try this
SWITCH(
TRUE(),
SELECTEDVALUE(Choice) = "A", SUM(X),
SELECTEDVALUE(Choice) = "B", SUM(Y),
TRUE(), SUM(Z)
)- AnonymousNot applicable
That Worked! Thanks So Much.
- juleshortonAdvocate III
This syntax works better than most I've tried, but mine doesn't switch to the last option when nothing is selected?