Dear Gurus,
I've been working on the HR report to calculate the number of employees who worked consecutively for > 12 days and >=26 days.
I could able to calculate the counter for consecutive days for each employee and for each day as below:
Calendar Day | Employee | Worked Hours | Break | Worked Hours (Counter) | Day-Off (Counter) | Consecutive Days |
01.07.2015 | 760 | 0 | 0 | 0 | 1 | 0 |
02.07.2015 | 760 | 8.75 | 0.33 | 1 | 0 | 1 |
03.07.2015 | 760 | 11.75 | 1.08 | 1 | 0 | 2 |
04.07.2015 | 760 | 8.75 | 0.33 | 1 | 0 | 3 |
05.07.2015 | 760 | 0 | 0 | 0 | 1 | 0 |
06.07.2015 | 760 | 11.75 | 1.08 | 1 | 0 | 1 |
07.07.2015 | 760 | 8.75 | 0.33 | 1 | 0 | 2 |
08.07.2015 | 760 | 11.75 | 1.08 | 1 | 0 | 3 |
09.07.2015 | 760 | 8.75 | 0.33 | 1 | 0 | 4 |
10.07.2015 | 760 | 8.75 | 0.33 | 1 | 0 | 5 |
11.07.2015 | 760 | 0 | 0 | 0 | 1 | 0 |
12.07.2015 | 760 | 6.5 | 0 | 1 | 0 | 1 |
13.07.2015 | 760 | 8.75 | 0.33 | 1 | 0 | 2 |
14.07.2015 | 760 | 11.75 | 1.08 | 1 | 0 | 3 |
15.07.2015 | 760 | 11.75 | 1.08 | 1 | 0 | 4 |
But the problem here is system is summing up the consecutive days when I remove Calendar day and even when I employee it is worse.
My Requirement is as below:
Jan | Feb | Mar | Apr | … | … | .. | Dec | |
>= 24 Consecutive Days | 1.00% | 0.12% | 0.30% | 0.63% | 0.21% | |||
>12 Consecutive Days | 5.00% | 2.41% | 7.41% | 9.41% | 4.41% | |||
< 4 days of rest in any a month | 10.00% | 9.34% | 4.34% | 12.34% | 2.34% |
% is calculated based on Total number of employees / number of employees with the consecutive days range
for ex: total # of employees = 100
>= 24 days = 10 Then 10/100 = 0.1
>12 days = 50 then 50/100 = 0.5
So, Kindly help me in the peculiar requirement.
Thanks a million in advance.
Regards,
Ravi Kanth