The portal dashboard displays some data based on a time range - e.g. it might display the number of assessments performed in the last 12 months. It also might show the data broken down into a number of groups - e.g. to display the assessments performed each month over the last 12 months.
Reporting periods are a way to specify what time frame the data should be returned for and how it should be broken down.
There are three parameters that define a reporting period:
-
period_unit - what is the basic time span being used for reporting - e.g. month
-
group_size - how many units make up each reporting group - e.g. is each group 1 month or 3 months
-
number_of_groups - how many reporting groups make up the reporting period - e.g. 12 1-month groups
The period_unit is the period of time that is the basic building block for the reporting periods:
The group_size is the number of units of time in each group. Each group covers a range of period_unit * group_size.
For example, with a period_unit of month, a group_size of 1 means we report individual months - January, February, March, etc.
With a period_unit of month, a group_size of 3, means we report three months at a time - e.g. January to March, May to July, September to November, etc.
Thenumber_of_groups is the number of groups of data to return in total.
A reporting period covers a total period of time of period_unit * group_size * number_of_groups.
Each period_unit has an alignment associated with it that is used to determine the start and stop dates of a group. e.g. when creating a group with a period_unit of month, and assuming today is the 2nd July 2020, the group will start on the 1st July and end on the 31st July 2020 (as it is aligned to the end of the current month).
The following table shows the alignment for each unit type:
Unit |
Alignment |
Example Group 1 |
Example Group 2 |
---|---|---|---|
day |
End-of-day |
28th June 2020 |
2nd July 2020 |
month |
End-of-month (31st) |
1st to 30th June 2020 |
1st to 31st July 2020 |
quarter |
End-of-quarter (end of March, June, Sept or Dec) |
1st Apr to 30th Jun 2020 |
1st July to 31st Sept 2020 |
year |
End-of-year (31st Dec) |
1st January to 31st Dec 2020 |
1st Jan to 31st Dec 2020 |
Note
Example Group 1 assumes we are basing the group on 28th June 2020
Example Group 2 assumes we are basing the group on 2nd July 2020
As a different period_unit will result in a different alignment, it means there is a key difference between a reporting period based on a group size of “3 months” as opposed to “1 quarter”, as shown below:
period_unit |
group_size |
Months in each period |
Alignment |
Example Period |
---|---|---|---|---|
month |
3 |
3 |
End of month |
1st May to 31st July '20 |
quarter |
2 |
3 |
End of quarter |
1st July to 31st September '20 |
Similarly, for a reporting period based on a group size of “12 months” as opposed to “1 year”:
period_unit |
group_size |
Months in each period |
Alignment |
Example Period |
---|---|---|---|---|
month |
12 |
12 |
End of month |
1st August '19 to 31st July '20 |
year |
1 |
12 |
End of year |
1st January to 31st December '20 |
Note
This table and the prior table assume we are basing the group on the 2nd July 2020
When returning the groups that make up a period, they are given a name that is suitable for displaying to a client.
The names are necessarily succinct to be able to fit on the axis of a report.
period_unit |
Name Basis |
Example group_size |
Example Group 1 |
Example Name |
---|---|---|---|---|
day |
date |
1 |
2nd July 2020 |
02/07/2020 |
month |
month + year |
1 |
1st to 31st July 2020 |
Jan 2020 |
month |
month + year |
12 |
1st August to 31st July 2020 |
Aug 2019 - Jan 2020 |
quarter |
start & end month + year |
1 |
1st July to 31st Sept 2020 |
Jul - Sep 2020 |
year |
year |
1 |
1st Jan to 31st Dec 2020 |
2020 |
year |
year |
3 |
1st Jan 2018 to 31st Dec 2020 |
2018 - 2020 |
Note
1. Assumes we are basing the group on a date of 2nd July 2020
Regardless of the unit, each group will have a start time of 00:00:00 and an end time of 23:59:59 - e.g. a group for the month of March 2020 runs from 1st March 2020 00:00:00 through to 31st March 2020 23:59:59.
The endpoints supporting reporting allow a timezone to be passed. In that case, the periods are adjusted so they start at 00:00:00 and end at 23:59:59, adjusted for the supplied time zone.
The default timezone is Sydney/Australia.
The following are standard period configurations, accessible via Portal Reporting Periods Endpoint and currently available within the portal analytics:
Name |
Unit |
Group Size |
Number of Groups |
Size of each group |
Use as Default |
Example First Period |
Example Last Period |
---|---|---|---|---|---|---|---|
Last 14 days |
day |
1 |
14 |
1 day |
no |
19th June '20 |
2nd July 2020 |
Last 3 months by week |
week |
1 |
13 |
1 week |
no |
6th -12th Apr '20 |
29th Jun - 5th July '20 |
Last 12 months |
month |
1 |
12 |
1 month |
yes |
1st - 31st Aug '19 |
1st - 31st July '20 |
Last 3 years by quarter |
quarter |
1 |
12 |
3 months |
no |
1st Oct - 31st Dec '17 |
1st July - 31st Sept '20 |
Last 5 years |
year |
1 |
5 |
12 months |
no |
1st Jan - 31st Dec '16 |
1st Jan - 31st Dec '20 |