Forum Discussion

GSPBI's avatar
GSPBI
Frequent Visitor
4 years ago
Solved

Filter out rows based on two columns (in DAX)

Dear Microsoft PowerBI community,   I have been a long time user of this forum and I really appreciate all the users that raised their queries and the those that respond to them.   I have come ac...
  • v-janeyg-msft's avatar
    4 years ago

    Hi, GSPBI 

     

    You can create a measure and use it in filter pane to filter the row you want to show in table.

    Since you have already written Check A, I will directly use column instead. My idea is to divide into two different situations.

    Measure:

    Measure =
    VAR a =
        COUNTX (
            FILTER (
                ALL ( 'Table' ),
                [Check A] = "Yes"
                    && [Package] = SELECTEDVALUE ( 'Table'[Package] )
            ),
            [Package]
        )
    VAR b =
        IF (
            MAX ( 'Table'[Planned/Actual] ) = "Actual"
                && a = 2,
            1,
            IF ( MAX ( 'Table'[Check A] ) = "Yes" && a = 1, 1 )
        )
    RETURN
        b
    

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please feel free to ask me.


    Best Regards,

    Community Support Team _ Janey