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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Jeffrey9
Regular Visitor

How to add an AND filter visual

I have a bridge table, let's say type of houses. And the fact table contains project registrations. Every project registration can contain multiple types of houses.

 

My filter visual is a dropdown list and I can select multiple values, but when I select two different types of houses, it shows all records containing one of the two types of houses. I want to keep the records having both types only.

 

Example: I select apartments and tiny house. As a result I want to keep the projects having both apartments AND tiny houses.

 

I tried to Google but I can't find the answer. Can anyone help? It is very much appreciated!

 

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Jeffrey9 ,

 

Here I suggest you to create an unrelate DimHouse table for slicer.

My Sample:

RicoZhou_0-1668157253821.png

DimHouse:

DimHouse = VALUES('Table'[House])

Measure:

Filter Measure = 
VAR _SELECTVALUE =
    VALUES ( DimHouse[House] )
VAR _COUNT1 =
    COUNTROWS ( _SELECTVALUE )
VAR _COUNT2 =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[Projects ] ),
            'Table'[House] IN _SELECTVALUE
        )
    )
RETURN
    IF ( _COUNT1 = _COUNT2, 1, 0 )

Add this measure into the visual level filter field of table visual and set it to show items when value = 1.

RicoZhou_1-1668157371229.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Jeffrey9 ,

 

Here I suggest you to create an unrelate DimHouse table for slicer.

My Sample:

RicoZhou_0-1668157253821.png

DimHouse:

DimHouse = VALUES('Table'[House])

Measure:

Filter Measure = 
VAR _SELECTVALUE =
    VALUES ( DimHouse[House] )
VAR _COUNT1 =
    COUNTROWS ( _SELECTVALUE )
VAR _COUNT2 =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[Projects ] ),
            'Table'[House] IN _SELECTVALUE
        )
    )
RETURN
    IF ( _COUNT1 = _COUNT2, 1, 0 )

Add this measure into the visual level filter field of table visual and set it to show items when value = 1.

RicoZhou_1-1668157371229.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.