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
wicker
Frequent Visitor

Calculate duration considering days off and the time of work

Hey, I need help with formulas for some difficult calculation.
There are operators of tech support with work shedule. I have table such this, where we see time of question and time of answer from operator.

I need to calculate time between this two dates in seconds, but I want to calculate ONLY worktime of operators.
For example operators work from 09:00 to 17:00, Saturday and Sunday are day-offs - there some problems:


Examples:

1.
Question time - Saturday 21:00
Answer time - Monday 9:15
Result of formula - 900 seconds (or 15 minutes). We don't count Saturday and Sunday (day offs) time.

2.
Question time - Tuesday 16:50
Answer time - Thursday 9:15

Result of formula - 30300 seconds (16:50-17:00 from Tuesday, 9:00-17:00 from Wednesday and 9:00-9:15 from Thursday)


p.s. work shedule I have in such table (1 - day-off, 0 - working day).

Days of work I take from this. Time of work rigidly regulated (for example - 9:00 - 17:00)

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @wicker,

 

I'd like to suggest you take a look at following link which has similar requirement(you need to transform calculation unit to second instead of hours):

Calculating Working hours

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @wicker,

 

I'd like to suggest you take a look at following link which has similar requirement(you need to transform calculation unit to second instead of hours):

Calculating Working hours

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.