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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

2 REPLIES 2
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)
)

That Worked! Thanks So Much. 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors