Forum Discussion

RonaldT's avatar
RonaldT
New Member
1 year ago
Solved

Total of Measure

I'm struggling to find a method for Power BI to tell me how many (the total) records it has found that meet a filter condition: "Present" is a percentage measure determined from the counts of presen...
  • AlexTheGreat's avatar
    1 year ago

    Hi,

     

    I did have no insights in your data so I assumed that student[present] is a boolean (true/ false)

    What I have done is:

    Created a measure for % present in the classes.

    Present % =
    DIVIDE(
        CALCULATE(SUM(Students[Present])),
        CALCULATE(COUNTROWS(Students))
    )

    Created a measure where it counts the rows when the attendance is perfect (100%)

    Total 100% Attendance Records =
    CALCULATE(
        COUNTROWS(
            FILTER(
                VALUES(Students[Name]),
                [Present %] = 1
            )
        )
    )

    Let me know if it helps!