Forum Discussion

RichWyeth's avatar
RichWyeth
Frequent Visitor
9 years ago
Solved

Multiple Filters (COUNTROWS)

Hi,   I am struggling to get a result for COUNTROWS based on multiple critera. From the table I am trying to filter all Males with a grade of either C,D or E and to give me the count of rows.    ...
  • CahabaData's avatar
    9 years ago

    MaleCDEcount = CALCULATE(
                                                     COUNTROWS(Grades),
                                                        FILTER(Grades,Grades[Gender]="M"),
                                                        FILTER(Grades,
                                                             Grades[Grade]="c" || Grades[Grade]="d" || Grades[Grade]="e")

                                                    )

     

    My table is named 'Grades' - you will want to change this code to your table name.