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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
cran
Helper I
Helper I

Calculate the number of leave days taken within selected period

Hello, 

I'm looking for a measure that will help me count the number of leave days taken within a selected period. 

 

I have a leave table that has employeeid leavestartdate and leaveenddate I also have a standard date table. 

 

Eg. 

Employeeid  leavestartdate  leaveendate

Emp1            1/5/2023          3/5/2023

Emp2            25/4/2023        5/5/2023

 

If user selects to look at leave information in the month of May, I would expect to see that the number of leave days taken is 8, as employee 2 includes a weekend (which shouldn't be included in count) and 4 days in April. The period selected can be changed to any length of time ie. They may select may, June and July and I would need the count to do the same thing between this period.

 

Please let me know if you need anymore information 

 

Thank you

1 ACCEPTED SOLUTION
2 REPLIES 2
Ahmedx
Super User
Super User

Thank you exactly what I was looking for 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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