Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Cheezeduckies
Frequent Visitor

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?
1 ACCEPTED SOLUTION
ravsha85
Frequent Visitor

Hi @Cheezeduckies  could you please try this

 

SWITCH(
TRUE(),
SELECTEDVALUE(Choice) = "A", SUM(X),
SELECTEDVALUE(Choice) = "B", SUM(Y),
TRUE(), SUM(Z)
)

View solution in original post

3 REPLIES 3
ravsha85
Frequent Visitor

Hi @Cheezeduckies  could you please try this

 

SWITCH(
TRUE(),
SELECTEDVALUE(Choice) = "A", SUM(X),
SELECTEDVALUE(Choice) = "B", SUM(Y),
TRUE(), SUM(Z)
)

This syntax works better than most I've tried, but mine doesn't switch to the last option when nothing is selected?

That Worked! Thanks So Much. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors