Forum Discussion

jpurcell's avatar
jpurcell
Advocate I
9 years ago
Solved

And slicing on Matrix

I'm having trouble figuring out how to get two slicers to use "and" filtering on a matrix.   All of the data is in one table, with employee name, a category, and a number value. Looks sort of like ...
  • v-sihou-msft's avatar
    9 years ago

    jpurcell

     

    In this scenario, you can create a measure to determine if Cats related to current Name is equal to selected Cats.

     

    Measure = 
    IF (
        CALCULATE ( DISTINCTCOUNT ( Table1[Cat] ), ALLSELECTED ( Table1[Cat] ) )
            = CALCULATE (
                DISTINCTCOUNT ( Table1[Cat] ),
                ALL ( Table1[Name] ),
                ALLSELECTED ( Table1[Cat] )
            ),
        1,
        0
    )

    Then add above measure into Visual Level Filter.

     

     

     

    Regards,