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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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