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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jw8888888888888
New Member

Measure to count based on multiple slicer values

I have a slicer that contains multiple values originating from 'wsccommon'[detected].  I'm trying to write a measure that I can use as a filter on a table.  I want the table to display values originating from 'wsccommon'[detected] only when it contains ALL of the values selected in the slicer.

 

I have:  Multple = CALCULATE(COUNT('wsccommon[detected]), 'wsccommon[detected]<>BLANK() || 'wsccommon[detected]), 'wsccommon[detected]<>BLANK())

 

I then added the measure to the table filter to filter when Multple is greater than 1.  

 

It does what I want when nothing is selected in the slicer but when I select more than one value in the slicer the table will diplay if it contains EITHER of the values and not BOTH of the values.

2 REPLIES 2
Ahmedx
Super User
Super User

I'm not sure I understood you BUT the calculation logic would be like this

Measure =
VAR _All =CALCULATE(DISTINCTCOUNT('wsccommon[detected]),REMOVEFILTERS())
VAR _Select = CALCULATE(COUNT('wsccommon[detected]), 'wsccommon[detected]<>BLANK())
RETURN
if (__All = _Select,1,0)
amitchandak
Super User
Super User

@jw8888888888888 , Try if these two functions can help

 

Power BI Tutorial: HasOneValue , Isfiltered:
https://youtu.be/cN8AO3_vmlY?t=10120

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.