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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gregboothdelt
Helper I
Helper I

formula for the number of working days between two dates

Hi

Does anyone know a formula to calculate the number of working days between two dates ?

Thanks

4 REPLIES 4
gregboothdelt
Helper I
Helper I

The formula needs to exclude the weekends and other non working days

v-yalanwu-msft
Community Support
Community Support

Hi, @gregboothdelt ;

You could create a date table ,then create a measure to calculate a measure.

Table = CALENDAR(DATE(2021,4,9),TODAY())

then create a measure

Count = CALCULATE(COUNT([Date]),FILTER(ALL('Table'),[Date]<=TODAY()&&[Date]>=DATE(2021,9,1)&&WEEKDAY(MAX([Date]),2)in {1,2,3,4,5}))

here could change Today() to end date , DATE(2021,9,1) to start date.

The final output is shown below:

vyalanwumsft_0-1631505617716.png


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
VijayP
Super User
Super User

@gregboothdelt 
DATEDIFF(startdate,enddate,DAY)




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.