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
Azeemuddin
New Member

Calculating Working hours

I have the following Data, I am trying to find a way to calculate Working hours between dates excluding Weekends.

 

WhatsApp Image 2022-10-25 at 11.45.37 AM.jpeg

 

Any help would be appreciated...

 

@amitchandak

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Azeemuddin , if you only need days - use networkdays.

https://amitchandak.medium.com/power-bi-dax-function-networkdays-5c8e4aca38c

 

new column

networkdays([Created], [closed],1)

 

or

 

networkdays(datevalues([Created]),datevalues( [closed]),1)

 

for business hour: https://exceleratorbi.com.au/calculating-business-hours-using-dax/

 

For date from datetime use

 

datevalue([Created])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Azeemuddin , if you only need days - use networkdays.

https://amitchandak.medium.com/power-bi-dax-function-networkdays-5c8e4aca38c

 

new column

networkdays([Created], [closed],1)

 

or

 

networkdays(datevalues([Created]),datevalues( [closed]),1)

 

for business hour: https://exceleratorbi.com.au/calculating-business-hours-using-dax/

 

For date from datetime use

 

datevalue([Created])

Thank you so much, Amit

for business hour: 
https://exceleratorbi.com.au/calculating-business-hours-using-dax/

The above solution solves my issue.

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.