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! Learn more

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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.