Within reporting, there are two main time off datasets:Time off requests and Time off period.
Time off requests
The time off request dataset is based on the data in the time off module in the exact way it is entered - simplistically it consists of a start date, end date, reason and duration.
For example, holiday request from 01/07/2020 to 05/07/2020 and 5 days duration. What you see in time off requests is the same as you will see in the time off module.
Time off period
The time off period dataset takes the data from each time off request and splits it into multiple records where each record will represent a date between the start and end date based on the employee working pattern between the start date and end date.
For example, using the same above example we would have 5 records in the time off period dataset - 1 for each day, each with a duration of 1.
Why do we have two datasets?
The above example is a very simple situation and, it is unlikely in this example that you would want or need the second dataset.
However, lets imagine a time off request like the below:
Start date: 26th June 2020
End date: 14th August 2020
Duration: 18 days
Let's now imagine you wanted a report of everyone who was off due to sickness in July.
Using the time off requests dataset you can filter on the start date and/or the end date - if you set the filter to say Start date is July or End date is July then this record would not show as it does not meet that criteria. That could mean that whole absence being missed from your data.
You *could* tweak the filters above to say where start date > 26th June which would the show the data but you would risk having data where the start and end date are in June so, either way, it is prone to error.
Using the time off period dataset, as the request gets split into individual days you can then filter where the date (i.e. the date of the individual day - not the start or end date) is in July.
It would not matter if the start date was before the period or in the period - the dataset would show the entry as it will have at least one date in July.
As well as knowing how many people were off due to sickness in July, say you also want to know the total sickness days in July.
If you use the above time off request, the issue in scenario 1 would arise. Even if you overcame that by tweaking your filters and there were no requests between the start date of 26th June and the start of July the duration, in this instance, would show as 18 days.
It is possible. but highly unlikely, that all 18 of those days were in July but it is much more likely that maybe 60% of them were in July whilst the rest were in June and August.
Using the time off requests dataset, you would not be able to accurately tell how many days were lost in July.
However, using the time off period dataset, you could simply do a sum of the durations for each of the dates which fall in July - in this example, it might give 10 for example which would then be an accurate view of actual days lost.
How do we determine what to put into the time off period dataset?
Put simply, we loop through every date between the start and end date and, for each date, we check the employee working pattern (including historic working patterns for prior requests, if needed) and (a) determine if that was a working day for the employee (i.e. this inserts it into the period dataset) and (b) the duration that working day was.
In the above example, there are 49 days and "36 working days" (assuming Monday to Friday) yet the request has a duration of 18 days.
This could mean that the employee only works 2.5 days a week or that they are working 1 week on and 1 week off etc but, either way, without the time off period dataset we would not be able to access the same level of detail.
Reading between the lines, for the above to work, you MUST have the correct working patterns (and potentially historic working patterns) in place for your employees - if you do not then you will most likely see discrepancies in the data mainly in the time off period dataset.
Should this happen, once you have fixed the discrepancy, you can go to the time off module and in the actions columns click the dropdown and select "View dates" which will show the time off period data for that time off request. You can then click on Regenerate which will re populate the time off period dataset for that request.
Note: if you do not fix the issue with the working pattern first then the Regenerate will, at best, show the same data as before clicking and, at worst, could show completely different data.