Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
| date | time | employee | available | device | voip |
| 24-jan-15 | 23:00:00 | 1001 | 1 | 756555 | 0 |
| 24-jan-15 | 23:50:09 | 1001 | 0 | toggle pause | 1 |
| 24-jan-15 | 0:11:51 | 1001 | 1 | toggle pause | 1 |
| 25-jan-15 | 0:22:59 | 1001 | 0 | toggle pause | 1 |
| 25-jan-15 | 0:31:52 | 1001 | 1 | toggle pause | 1 |
| 25-jan-15 | 0:58:52 | 1001 | 0 | toggle pause | 1 |
| 25-jan-15 | 1:03:56 | 1001 | 1 | toggle pause | 1 |
| 25-jan-15 | 2:15:53 | 1001 | 0 | toggle pause | 1 |
| 25-jan-15 | 2:31:23 | 1001 | 1 | toggle pause | 1 |
| 25-jan-15 | 3:00:00 | 1001 | 0 | 756555 | 0 |
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)
Thanks Ramon,
Will look into this in a minute! Appreciate also your effort. This community is really terrific!
Alex
So In your excel what will be the Duty Start time & Duty End Time for employee 1001?
Please find the image where I have worked it out in XLS.
Alex
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
glad it worked