Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Date time overlapping hours, how to detect and sum duration of overhang and date time

thoe0059
6 - Meteoroid

Hi, 

 

When two tasks are carried out concurrently by the same employee doing the same task on the same place, but the start or end is different, i need to find out how much overhang there is (in hours).

 

I have added an example of the data, here the first bug fix is from 11:00 to 18:00 

But in between another bugfix is carried out from 9:00 to 12:00

 

Here the total should be the period from 9:00 to 18:00 (9 hours) minus the two hours where these tasks overlap (In total that would be 7 hours). 

 

Can you make a formular to sort this out? The attached is only a sample, the real data is 1000+ rows. 

 

I hope my explanation makes sense, and I hope to hear from someone on this great community. 

 

SAMPLE

PlaceEmployeeTaskStartTimeEndTimeDuration
OfficePerson 1Cleaning15-04-2020 07:5015-04-2020 12:354.75
OfficePerson 1Cleaning16-04-2020 08:5016-04-2020 11:002.17
OfficePerson 1Bug fix16-04-2020 11:0016-04-2020 18:007
OfficePerson 1Bug fix16-04-2020 9:0016-04-2020 12:003
OfficePerson 3Bug fix16-04-2020 14:5016-04-2020 18:003.17

 

 

Kind regards, Thøger

1 REPLY 1
Luke_C
17 - Castor

@thoe0059 

 

There's a weekly challenge that does exactly this! If you look at some of the solutions there you should get what you need:

https://community.alteryx.com/t5/Weekly-Challenge/Challenge-106-How-Long-were-the-Lights-On/td-p/142...

 

Labels