Forum Discussion

Sanctuarius's avatar
Sanctuarius
New Member
4 years ago
Solved

COUNT Formula with Multiple Criteria

Hi all,

 

I was hoping someone could assist me with a DAX query as I have fairly basic knowledge of it.

 

What would be the formula if I would like to COUNT number of rows if the conditions for the following columns are met: 

 

[assignment_group] = "Site Survey - Area C", "Site Survey - South Flank" and "Site Survey - Yandi"

[Site Survey - Rework] = "TRUE"

 

 

Any help would be greatly appreciated. Thanks!

 

  • Hi Sanctuarius ,

     

    Please try this:-

    measure_ =
    COUNTROWS (
        FILTER (
            'table',
            'table'[assignment_group]
                IN { "Site Survey - Area C", "Site Survey - South Flank", "Site Survey - Yandi" }
                && 'table'[Site Survey - Rework] = "TRUE"
        )
    )

     

    Thanks,

    Samarth

4 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi Sanctuarius ,

     

    Please try this:-

    measure_ =
    COUNTROWS (
        FILTER (
            'table',
            'table'[assignment_group]
                IN { "Site Survey - Area C", "Site Survey - South Flank", "Site Survey - Yandi" }
                && 'table'[Site Survey - Rework] = "TRUE"
        )
    )

     

    Thanks,

    Samarth

    • Sanctuarius's avatar
      Sanctuarius
      New Member

      Hi Samarth_18 ,

       

      Thank you for your quick response.

       

      Apologies if this is a stupid question as I'm new to all this, but do I have to create a New table for this DAX expression or this can be created with a New measure? What is the 'table' parameter?