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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
cosminc
Post Partisan
Post Partisan

DAX multiple table filters intersection

Hi all,

i have a base like below and need to create a measure with multiple filters intersection like this:

VAR

_first_filter all ID where Label = A and Value = 1

_second_filter all ID where Label = B and Value = 1

_third_filter all ID where Label = C and Value = 1

RESULT

and need to countrows of source from below with filters Label = C &&  all common ID between the 3 filter tables from above

 

Thanks in advance,

Cosmin

 

 
IDLabelValueClient
1A1cosmin
1B1cosmin
1C1cosmin
2A0cosmin
2B1cosmin
2C1cosmin
3A0cosmin
3B1cosmin
3C0cosmin
4A1cosmin
4B1cosmin
4C0cosmin
5A1cosmin
5B0cosmin
5C999cosmin
1A1marius
1B0marius
1C1marius
2A0marius
2B1marius
2C1marius
3A0marius
3B1marius
3C0marius
4A1marius
4B0marius
4C1marius
5A0marius
5B1marius
5C0marius
2 ACCEPTED SOLUTIONS
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @cosminc ,

 

Please refer to below measure:

Count_rows =
VAR temp_tab =
    ADDCOLUMNS (
        Sample4,
        "Label number", CALCULATE (
            DISTINCTCOUNT ( Sample4[Label] ),
            ALLEXCEPT ( Sample4, Sample4[ID] ),
            Sample4[Value] = 1
        )
    )
RETURN
    COUNTROWS ( FILTER ( temp_tab, [Label number] = 3 && [Label] = "C" ) )

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

Perfect!

Thanks,

Cosmin

View solution in original post

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @cosminc ,

 

Please refer to below measure:

Count_rows =
VAR temp_tab =
    ADDCOLUMNS (
        Sample4,
        "Label number", CALCULATE (
            DISTINCTCOUNT ( Sample4[Label] ),
            ALLEXCEPT ( Sample4, Sample4[ID] ),
            Sample4[Value] = 1
        )
    )
RETURN
    COUNTROWS ( FILTER ( temp_tab, [Label number] = 3 && [Label] = "C" ) )

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Perfect!

Thanks,

Cosmin

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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