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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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