Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I am trying to counts students absent if they have skipped more than 8 bell periods on the same day. I was wondering if somebody could help me out here. I tried a distinct count with a counts of bell periods greater than 6 (that is the ballpark) but it is not working. I am providing a sample table below here.
| Students ID | Bell Period | Date |
| 101 | 1 | 6/1/2020 |
| 101 | 2 | 6/1/2020 |
| 101 | 3 | 6/1/2020 |
| 101 | 4 | 6/1/2020 |
| 101 | 5 | 6/1/2020 |
| 101 | 6 | 6/1/2020 |
| 101 | 7 | 6/1/2020 |
| 101 | 8 | 6/1/2020 |
| 101 | 9 | 6/1/2020 |
| 103 | 1 | 6/1/2020 |
| 103 | 2 | 6/1/2020 |
| 103 | 3 | 6/1/2020 |
| 103 | 4 | 6/1/2020 |
| 103 | 5 | 6/1/2020 |
| 103 | 2 | 6/2/2020 |
Solved! Go to Solution.
You could try an expression like this:
More than 8 bells =
VAR summarytable =
ADDCOLUMNS (
SUMMARIZE ( Table, Table[Students], Table[PeriodDate] ),
"@BellsMissed", CALCULATE ( COUNTROWS ( Table ) )
)
RETURN
COUNTROWS ( FILTER ( summarytable, [@BellsMissed] > 8 ) )
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
You could try an expression like this:
More than 8 bells =
VAR summarytable =
ADDCOLUMNS (
SUMMARIZE ( Table, Table[Students], Table[PeriodDate] ),
"@BellsMissed", CALCULATE ( COUNTROWS ( Table ) )
)
RETURN
COUNTROWS ( FILTER ( summarytable, [@BellsMissed] > 8 ) )
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@syasmin25 - So what are we looking at? Is that your source data and does it represent periods skipped or periods attended? What is the expected output from the sample data set?
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
This is a sample that I created with periods that the students was marked absent.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |