Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Michael_N
Contributor
Contributor

Calculate fully completed schedueled work hours

Hi

I am trying to calculate the number of complete hours staff has worked at different times during the day. It is a 24/7 schedule. 

Below is an example of how the data looks (there are thousands and thousands of rows like this). An Id that represent a staff member, and date/time when they start work and end work. 

I am trying to figure out how to calculate the number of fully completed scheduled working hours that there are at different times during the day...i.e. between  0800 - 0900, 0900 - 1000, 2200 - 2300 ...(at all hours during the day). I am interested in both fully completed hours but also partly completed hours, i.e. start at 0730...or end at 1615. 

I want to be able to select several days or weeks to see aggregated statistics for scheduled hours at different times during the day.

Right now I am stuck ... I include an example app .

//Michael

IdStart_timeEnd_time
A82132020-01-03 06:002020-01-03 15:15
A52322020-01-03 13:002020-01-03 23:00
A82312020-01-03 08:002020-01-03 16:30
A12122020-01-03 22:002020-01-04 07:00
A82132020-01-04 06:002020-01-04 16:00
A82312020-01-04 13:502020-01-04 23:00
A52322020-01-04 08:002020-01-04 16:00
A12122020-01-04 21:002020-01-05 07:30
A82132020-01-05 06:002020-01-05 16:00
A82312020-01-05 13:002020-01-05 22:00
A52322020-01-05 08:002020-01-05 16:45
A12122020-01-05 22:002020-01-06 07:00

 

Labels (3)
0 Replies