Hi
I am trying to consolidate employee multiple absences into 1 single rows for absence of the same type. Employees are allowed an allowance of 10 days absences (of each absence type) so anything above that will be showing as excluded.
The table below is what the data looks like and further below is what I am looking to get the data to look like. For example if the employee has more than one instance of the same absence type (e.g. Sickness) then these should be consolidate on one line.
Many thanks
I am trying to consolidate employee multiple absences into 1 single rows for absence of the same type. Employees are allowed an allowance of 10 days absences (of each absence type) so anything above that will be showing as excluded.
The table below is what the data looks like and further below is what I am looking to get the data to look like. For example if the employee has more than one instance of the same absence type (e.g. Sickness) then these should be consolidate on one line.
Many thanks
Current table | ||||||
Employee ID | Employee Name | Absence Type | Absence start date | absence end date | Total number of days absent | Excluding number of allowance days |
123456 | John Smith | Sickness | 01/01/20 | 15/01/20 | 15 | 5 |
123456 | John Smith | Sickness | 10/02/20 | 11/02/20 | 2 | 2 |
987654 | Sheila Brown | Sickness | 01/01/20 | 05/01/20 | 5 | 0 |
987654 | Sheila Brown | Sickness | 15/02/20 | 15/02/20 | 1 | 0 |
987654 | Sheila Brown | Maternity | 25/02/20 | 27/02/20 | 3 | 0 |
987654 | Sheila Brown | Maternity | 01/03/20 | 15/03/20 | 15 | 8 |
Desired table | ||||||
Employee ID | Employee Name | Absence Type | Total number of days absent | number of days excluded after allowance | ||
123456 | John Smith | Sickness | 17 | 7 | ||
987654 | Sheila Brown | Sickness | 6 | 0 | ||
987654 | Sheila Brown | Maternity | 18 | 8 | ||