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 August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.