Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Academic course pass rate

Hello every one, I am new to Power BI because my institution just switched to it recently. I need help creating a measure that calculates course pass rate. This would represent the percent of course...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Anonymous 

    Create a measure to retreive pass/total.

    PASS_RATE_M =
    VAR TOTAL_COUNT =
        COUNTROWS ( T22 )
    VAR PASS_COUNT =
        CALCULATE (
            COUNTROWS ( T22 ),
            FILTER (
                T22,
                T22[Grade]
                    IN {
                    "A",
                    "B",
                    "C"
                }
            )
        )
    RETURN
        PASS_COUNT / TOTAL_COUNT

     

    Cheers!
    A