Forum Discussion

jw8888888888888's avatar
jw8888888888888
New Member
3 years ago

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

  • 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)