Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
RonaldT
New Member

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 presents and absents

I need either the total to say "5" or to create a new card that shows "5" for 100%

How to achieve this?

RonaldT_0-1751615949064.png

 

1 ACCEPTED SOLUTION
AlexTheGreat
Resolver II
Resolver II

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!

View solution in original post

5 REPLIES 5
Natalie_iTalent
Administrator
Administrator

Dear community members,

A response that was unrelated to the original topic has been removed from this thread.  We wanted to add this clarification as there are additional comments related to that comment shown.

 

Please feel free to reach out to me if you have any questions.  

 

Best,

Natalie H.

Community Manager

danextian
Super User
Super User

I’m fine with using AI, but the response should be validated. This will actually throw a PLACEHOLDER error. You can’t directly filter a measure inside CALCULATE like that — it doesn’t know which rows or table context to apply the filter to.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thank you for your valuable feedback and for pointing out the technical nuance regarding measures inside CALCULATE. You are absolutely right—filtering on a measure within CALCULATE doesn’t work as intended due to context limitations, and it’s important for the community to be aware of these subtleties in DAX.

I appreciate your attention to detail and your willingness to help maintain the quality of responses here. Discussions like this are what make our community stronger and more helpful for everyone.

Thanks again for your contribution!

AlexTheGreat
Resolver II
Resolver II

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!

Got it! I was missing the little parameter "VALUES" - it makes a massive difference. Thanks a mil

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.