Forum Discussion

suryakamesh's avatar
suryakamesh
Regular Visitor
8 years ago
Solved

DAX Function for COUNTIF and/or CALCULATE

Hi need help on DAX,

 

I have a data of columns names as ,student name and status(pass/fail).so need to calculate the pass% and fail% for total ppulation of students with the use of dax funftion.Can any one help me to get the dax function.

 

Thanks in advance.

 

  • Hi,

     

    Try this measures

     

    Pass % =CALCULATE(COUNTROWS(Data),Data[Status]="Pass")/COUNTROWS(Data)

    Fail % =CALCULATE(COUNTROWS(Data),Data[Status]="Fail")/COUNTROWS(Data)

     

    Hope this helps.

3 Replies

  • Hi,

     

    Try this measures

     

    Pass % =CALCULATE(COUNTROWS(Data),Data[Status]="Pass")/COUNTROWS(Data)

    Fail % =CALCULATE(COUNTROWS(Data),Data[Status]="Fail")/COUNTROWS(Data)

     

    Hope this helps.