Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hello,
I lost several weeks to try find how to count absenteeism.
I have a Absenteeism table [Emp ID], [start date], [end date], [absence reason]
calendar table and [working days] kolumn
my measure is
abs working days = calculate(countrows('calendar'), datesbetween(calendar, absenteeism[start date], absenteeism[end date], Calendar [working days]=1, all(calendar))
relations beatween Absenteeism table and calendar table [Date] to [stard date] as one to many and calendar[date] to [end date] is switch off.
How to calculate monthly absenteeism?
Any support will appreciate
Solved! Go to Solution.
Hi @Anonymous,
The formula is working, it's couting working days beatween two dates but unfortunatelly doesn't split beatween month.
Data
Result
ID Employee #3 has 75 absent days in February - it is wrong
ID Employee #1 has 8 abs days in December - is wrong as well
The relations
I made similar formula bat teh result is the same
Hi @JanuszC ,
Calculate the for each reason.
abs working days =
CALCULATE (
COUNT ( 'calendar'[Date] ),
FILTER (
ALLSELECTED ( 'calendar' ),
'calendar'[Date] >= SELECTEDVALUE ( Absenteeism[start date] )
&& 'calendar'[Date] <= SELECTEDVALUE ( Absenteeism[end date] )
&& 'calendar'[working days] = 1
)
)
Then sum the abs working days for the same Emp ID.
Measure = SUMX(FILTER(ALLSELECTED(Absenteeism),Absenteeism[Emp ID]=SELECTEDVALUE(Absenteeism[Emp ID])),[abs working days])
Best Regards,
Jay
Hi @Anonymous,
The formula is working, it's couting working days beatween two dates but unfortunatelly doesn't split beatween month.
Data
Result
ID Employee #3 has 75 absent days in February - it is wrong
ID Employee #1 has 8 abs days in December - is wrong as well
The relations
I made similar formula bat teh result is the same
Maybe I did wrong assumption, e.g
Worker A had sick 25-Dec-2021 till 5-Jan-2022 so his absenteeism was 10 calendar days or 8 working days (1st and 2nd of January was weekend) The graf should show 5 working days in December and 3 in January . The formula is showing 1 in December.
@Whitewater100thank You for your support, it is still doesn't work properly. I need a few days to check what is going on.
Hi:
I beleive your measure for absence will work if you put month on visual axis. You can add columns to your date table. You might even want a separate and unique employee table.
The calculated columns to add to your date table could be
Month Name = FORMAT('Calendar'[Date], "MMM")
Month & Year = FORMAT('Calendar'[Date],"YYYYMM"))
If you want monthly absense average (this will show correct month absence when visual axis is month as well)
Avg Month Absense = AVERAGEX(Calendar[Month & Year]), [Abs working days])
You can also calc absense =
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |