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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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