Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
Solved! Go to Solution.
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!
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
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.
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!
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |