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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
andybrace
Frequent Visitor

Slicer to select Boolean values equal 1 or ALL but not 0

I have a column in my data set that is boolean values.  I need a filter where the user has 2 options, these are either

1) Select ALL values

2) Select boolean values = 1

 

There is never a scenario they would select just 0's.

 

I want to make it super user friendly and no need to understand that underlying data.  So, they would just have 2 options "Yes"=ALL, "No"=1.

 

The only way I can think is to have a toggle switch with bookmarks attached.  However, we already have A LOT of bookmarks and I think this will make it too complicated.  I was hoping there was an option using a slicer somehow as many of our other report settings are through slicers.

 

Anyone have any ideas how to accomplish this using a slicer?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@andybrace , Create a independent table with

Yes

No

 

or

 

All

1

 

Then create a measure like

 

Switch(selectedvalues(Table[column]),

"Yes", sum(fact[Value]),

calculate(sum(fact[Value]),filter(fact, fact[column]=1))

)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
andybrace
Frequent Visitor

Thanks!  This works well

amitchandak
Super User
Super User

@andybrace , Create a independent table with

Yes

No

 

or

 

All

1

 

Then create a measure like

 

Switch(selectedvalues(Table[column]),

"Yes", sum(fact[Value]),

calculate(sum(fact[Value]),filter(fact, fact[column]=1))

)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors