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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jpurcell
Regular Visitor

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 this:2017-07-18 12_16_53-Baseball cards v0.13 - Power BI Desktop.png

I want to be able to filter for employees who have only 3s (or 3s and 2s) in all of the categories selected in the other slicer. But it is listing employees with a 3 in any category along with blanks. The dashboard looks like this currently:2017-07-18 12_21_17-Baseball cards v0.13 - Power BI Desktop.png

But we were hoping to get somehting like this:

 

2017-07-18 12_22_16-Baseball cards v0.13 - Power BI Desktop.png

 

 

 Any Ideas would be appreciated, thanks.

 

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@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.

 

 

8.PNG

 

Regards,

View solution in original post

2 REPLIES 2
v-sihou-msft
Employee
Employee

@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.

 

 

8.PNG

 

Regards,

Thanks, that worked like a charm.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors