From the available time intervals (year, season, month, week, day of the month, day, date, shift, duration), select those based on which you want to group the tabular data. Grouping can be either single- or multi-level. Multi-level grouping implies that there are several groupings for different time intervals. When using it, it is required to assign a hierarchy (specify nesting). For example, the grouping can be as follows: tabular data is grouped by year, within each year by months, and within months by days. Nesting is adjusted by dragging the intervals in the Grouping column up or down, with the element above in the list containing the ones that are located below.
If grouping by such intervals as season and duration is selected, at the bottom you can find a special block where it is necessary to set values for the intervals.
Depending on the report type, besides standard groupings (by time intervals), additional groupings can be used as well (for example, by geofence, route, sensor, user, event, action type, violation type, trips, streets). In this case, the grouping works by the name of the element.
Sorting is the distribution of information in a table in descending or ascending order based on the selected characteristics.
Sorting allows to distribute the grouped data by any selected column of the report table.
Next to each added grouping interval, in the Sorting column there is a drop-down list where you can specify the column included in the report so that the data will be sorted by the specified characteristic (column) within the grouping. The selected sorting criterion is applied to the subsequent (nested) grouping level. In addition, to the left of the drop-down list there is an icon with the help of which you can set the direction of sorting (from smaller to greater and vice versa).
Tabular data can be sorted even if the grouping is absent. To do this, in the drop-down list in front of the Total interval select the sorting parameter and also set the direction of grouping.
Let us consider the example of grouping and sorting use.
We create a report on trips. In this report we are interested in the maximum speed, duration, and mileage. Mark these columns. In addition, the information should be grouped by years, months and dates; the dates, in turn, should be sorted by the maximum speed (from high to low).
By default, there is no grouping, i.e. without adding grouping or sorting settings, we would get a detailed report where an individual line would correspond to each criterion. These lines would be arranged in chronological order or according to the sorting, indicated next to the Total grouping.
In order to get the result that corresponds to our task, we need to add the Year, Month and Date groupings. If necessary, we can move the grouping criteria to the desired position in the list (we need the Year –> Month –> Date sequence).
Next, we determine the sorting criteria and the direction. Since we want to set sorting for the level nested in months (for dates), we select the corresponding criterion from the drop-down list of months. Then click the icon of sorting direction to adjust it from a bigger to a smaller value.
By default, the data is sorted in chronological order.
The report looks as follows:
Compared to the table for which the grouping and sorting settings are not specified, this table has two additional columns. The first one is a column containing the ‘+’ and ‘-’ buttons, which help show/hide nesting levels. The second is the Grouping column, which shows the levels themselves. The information in the table is grouped by years, and by clicking on the plus the next levels of grouping (months, dates) are opened. The dates are sorted by the maximum speed (from high to low).
When grouping data, the events that began in the interval are included in it. To determine the duration of an event, its entire duration is taken into account, even if it has already ended in another interval. That is why in the Duration column there may be values exceeding the size of the interval itself.
When grouping the table data, it makes sense to use the Total time column, which, unlike the Duration column, shows not the sum of the intervals (e.g. the total time of all trips), but the time from the beginning of the first interval to the end of the last one. This allows, for instance, to calculate the total time of the working day (convenient for travel sheets).
This option applies only to the reports with the grouping by shifts. If it is not activated, the whole interval of the trip which intersected with the shift, gets in the report. If it is activated, then only the data from the messages received within the specified interval is included in the report.