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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
syasmin25
Helper V
Helper V

Count of absences per day

Hello,

Hope you all are doing well. I was working on something and am pretty new to DAX. I’m trying to the total count of people who are absent in a day. However the database tends to track absences by period. Thus, I can find a person having a few records within a day. I was wondering if there was any way I count do a count of each person using their unique ID just once. I have a sliver that has dates.

Any help will be appreciated. Thank you!
2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Yes, you should be able to but will depend on your data. 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

 

You may find this useful: https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/td-p/409364



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hello, 

So I am providing a sample here. I am trying to count the number of students that are absent for more than 4 periods in a day. I will be having a slicer than can go back to a previous date to number of students that are absent for more than 4 periods to be counts within the range that a user might want to see it. Thus I suppose, just a distinct count of the "ID" won't do. Please help me out!

School_NameAbsent_DateNamePeriodStudent_ID
School_12/27/2020John3258
School_22/28/2020Harry3101
School_33/12/2020Hermione1225
School_43/11/2020Ginger1747
School_22/28/2020Harry4101
School_22/28/2020Harry5101
School_22/28/2020Harry6101
School_22/28/2020Harry7101
School_22/28/2020Harry8101
School_32/25/2020Hermione2225
School_32/25/2020Hermione3225
School_32/25/2020Hermione4225
School_33/12/2020Hermione3225
School_33/12/2020Hermione4225
School_33/12/2020Hermione5225
School_33/12/2020Hermione6225
School_33/12/2020Hermione7225
School_43/11/2020Ginger2747
School_43/11/2020Ginger3747
School_43/11/2020Ginger4747
School_43/11/2020Ginger5747
School_43/12/2020Ginger1747
School_43/12/2020Ginger2747
School_43/12/2020Ginger3747
School_43/12/2020Ginger4747
School_11/31/2020Jane1500
School_11/31/2020Jane2500
School_11/31/2020Jane3500
School_11/31/2020Jane4500
School_23/13/2020Ron1699
School_23/13/2020Ron2699
School_23/13/2020Ron3699
School_43/12/2020Ginger5747
School_41/25/2020Ginger3747
School_41/25/2020Ginger4747
School_41/25/2020Ginger5747
School_12/28/2020John1258
School_13/10/2020John3258
School_13/11/2020John3258
School_13/13/2020John1258
School_13/13/2020John2258
School_13/13/2020John3258
School_13/13/2020John4258
School_13/13/2020John5258
 

Sample raw shot of the visual is below (the number of students are from a different table that depicts the total number of students enrolled in the schools) 
** The real data is much much bigger.

Capture.PNG









Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.