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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Bfaws
Helper III
Helper III

Help with DAX Filter Function (or other option if better)

Hi,

 

I was hoping someone could help.  I have a list of absences from employees - this list contains employee number, absence type and amount of hours.  The end result is that i calculate the average amount of days off per person.  I have this done nicely for all absence types, and can add a slicer that filters by a specific absence type.  I would really like a stand alone table which shows the absence type "Sick (Unplanned)" without using a filter.

 

What I would really like is a measure that calculates the average days off person by a single or group of absence types so I can use these as stand alone visuals.  I have tried the filter finction but am struggling.

 

Please see the attached .pbix for more information

 

Access file here 

 

Any help would be much appreciated.

 

Thanks,

 

Brendan

2 ACCEPTED SOLUTIONS
harshnathani
Community Champion
Community Champion

Hi @Bfaws ,

 

 

# Absent Day Sick Unplanned = CALCULATE(Absenteeism[# Absent Days],FILTER(Absence,Absence[Abs. code(T)] = "Sick (Unplanned)"))
 
1.jpg
 
 
Regards,
HN

View solution in original post

Hi @Bfaws ,

 

You can use this measure.

 

# Absent Day Group = CALCULATE(Absenteeism[# Absent Days],FILTER(Absence,Absence[Abs. code(T)] IN { "Sick (Planned)","Part Time Medical Grounds" } ))
 
 
Regards,
Harsh Nathani

View solution in original post

4 REPLIES 4
harshnathani
Community Champion
Community Champion

Hi @Bfaws ,

 

 

# Absent Day Sick Unplanned = CALCULATE(Absenteeism[# Absent Days],FILTER(Absence,Absence[Abs. code(T)] = "Sick (Unplanned)"))
 
1.jpg
 
 
Regards,
HN

Hi HN,

 

Thats brilliant - thank you very much. 

 

What if I needed to add another couple of absence types to form a group - "Sick (Planned)", and "Part Time Medical Grounds" - is there a way to ammend the existing measure?

 

Thanks again, 

 

Brendan

Hi @Bfaws ,

 

You can use this measure.

 

# Absent Day Group = CALCULATE(Absenteeism[# Absent Days],FILTER(Absence,Absence[Abs. code(T)] IN { "Sick (Planned)","Part Time Medical Grounds" } ))
 
 
Regards,
Harsh Nathani

Hi Harsh Nathani,

 

Thanks you so much - this is really helpful and has worked exactly as expected.

 

Thanks,

 

Brendan

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.