Time and date are two of the most common choices for comparison. These two calculations aim to make comparing periods of time as easy as possible. Both of these calculated metrics are found in the Calculation engine menu ().
Time comparison calculated metric
- Results against the previous month.
- Results against the same month in the previous year.
- Results against a rolling 12-month average.
A time comparison calculated metric can only use reference metrics from the original dataset, not any calculated metric.
- Name of your time-comparison calculated metric.
- The metric you are comparing data from.
- Your date field. The date field is a date attribute containing the time periods you would like to measure. In the example below, the calculation is measuring the number of replies by when the ticket was created.
- The offset level. The offset is the time category that will appear on your chart and what your results will be measured against.
- The offset start and end. The offset start and end points are the values the calculations begins and stops measuring at. For example, an offset start point of one would begin measuring at the first Year value. An offset end point of three would stop measuring at the third Year value.
On the column chart below, you can see the time comparison calculated metric and the number of replies. Because the offset start point is twelve, the first twelve months of the time comparison metric are empty.
Time comparison calculated metrics are particularly useful in metric comparison visuals such as KPI, gauge, and bullet charts (see Comparing metrics). Time comparison calculated metrics are dynamic, so they will react to interactions and filters. For example with date filtering, the offset will remain the same no matter what time period the viewer looks at.
Date range calculated metrics
Date range calculated metrics create totals for a specified period of time. They are useful for looking at metrics with ranges that don't fit into a calendar period, such as the last seven days, the previous seven days, or dates that differ year-to-year like Easter.
When specifying the period of time for your date range calculated metric, you have two different options, simple and advanced.
With the simple option, you can select from a list of named periods or use Custom to select a specific calendar start and end day, month, or year.
With the advanced option, you can select separate beginning and end dates. For each beginning and end date, you can select from a list of named periods, enter in a calendar date, view all history, or select a rolling period. In a rolling period, you can select date ranges like seven days in the past or a year in the future.
You can also repeat the selected range and compute the date range calculated metric separately from your other calculated metrics. This option is useful if you are using metrics or attributes that are included in other calculated elements. If you select Compute separately, there will be a separate calculation for the query, and it will not conflict with any other calculated elements.