Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating Work & Pause

Hi Qliks,

I am still discovering QV and have a challenge at hand...

1) I want to calculate duty times (availability)

2) I need to count the pauses and add all pause times during the duty (hence: calculating effective working time).

This is an example of my XLS log for one specific duty: (number of pauses will fluctuate based on employee)

     

datetimeemployeeavailabledevicevoip
24-jan-1523:00:00100117565550
24-jan-1523:50:0910010toggle pause1
24-jan-150:11:5110011toggle pause1
25-jan-150:22:5910010toggle pause1
25-jan-150:31:5210011toggle pause1
25-jan-150:58:5210010toggle pause1
25-jan-151:03:5610011toggle pause1
25-jan-152:15:5310010toggle pause1
25-jan-152:31:2310011toggle pause1
25-jan-153:00:00100107565550

So, employee '1001' started his duty on the 24th at 11pm. (Based upon conditions: 'available' = '1' AND 'device' <> 'toggle pause').

He ended the 25th at 3 am (Based upon conditions: 'available' = '0' AND 'device' <> 'toggle pause')

Resulting in the answer:

--> Duty time = 4:00:00 (hours)

Pause is more tricky:  at 23:50:09 the employee becomes unavailable. (Based upon conditions: 'available' = '0' AND 'device' = 'toggle pause') {so, he start his first pause}

At 0:11:51 he becomes available again. (Based upon conditions: 'available' = '1' AND 'device' = 'toggle pause') {so, he start his first pause}(effective pause = 0:21:42).

--> He has 4 pauses in this duty.

--> Total pause time = 0:51:09

--> Availability = 78,7%

I would be more than happy if anyone could help me out on this one.

Thank you so much!

Alex

(Going back to the 'QlikView 11 for Developer' book)

14 Replies
Not applicable
Author

Thanks Ramon,

Will look into this in a minute! Appreciate also your effort. This community is really terrific!

Alex

Kushal_Chawda

So In your excel what will be the Duty Start time & Duty End Time for employee 1001?

Not applicable
Author

Please find the image where I have worked it out in XLS.

Alexkush.JPG

Not applicable
Author

Hi Ramon,

Think you nailed it! I will be double checking if weird things happen in the output when I start expanding the long list of rows in Excel.

I would also like to thank the other contributors just as much! Kush and Massimo: I have learned a lot the last days!

Keep up the good work. It is appreciated by people in (desperate sometimes :-)) need!

Alex

ramoncova06
Partner - Specialist III
Partner - Specialist III

glad it worked