Forum Discussion

cosminc's avatar
cosminc
Post Partisan
7 years ago
Solved

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 Labe...
  • v-yulgu-msft's avatar
    7 years ago

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

     

    Best regards,

    Yuliana Gu

  • cosminc's avatar
    cosminc
    7 years ago

    Perfect!

    Thanks,

    Cosmin