Explore features time and date calculations that help you to analyze results over a period of time. Both of these calculated metrics are configured in the calculations 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.
- A name for the 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 Chart types for 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 a 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 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.
4 Comments
How can I do something similar for a metric like COUNTS (Ticket)? I want to have columns that are rolling variable date ranges - so not last year, but last 12 months. Not last half year, but last 6 months. Is that possible. Per the above instructions, the metric i'm using isn't date based, so I can't choose it when trying what is laid out in this article. Thanks.
Hi Rob, is there another resource that explains how to create Month To Date This Year (MTDTY) and Month To Date Last Year (MTDLY) time based metrics? Trying to build a query with these two vales for solved tickets with a % difference.
Hi James, unfortunately, there isn't an article that explains how to do this. I'd recommend as a first option to try posting this in our community forums. There are some very knowledgeable folks in there who might be able to suggest a way of accomplishing this. I hope this helps!
Time Comparison Metric is poorly documented. I want to create a Year over Year ticket increase calculation
That means todays date and 12 months back, compared to the previous period and so on.
How can I achieve this?
Please sign in to leave a comment.