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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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