Time options for saved metrics

In your project, you have metrics that calculate some data, such as sales in the store per day. The results depend on the calculation interval that you set: after applying this interval to the formula, the final data is returned.

For our example, we are taking 1 day as an interval for calculations. For your project, you might have many such numbers for several business years. Processing all this data may slow down the performance and complicate the visual representation. Also, you may not need all this data, but want to see only the last numbers in a "compressed" way, or may only need data for example older than X years.

  1. Set the time options for your metric.

  2. For example, we have a metric that calculates the sales on a daily basis (Initial interval = Day). To reduce the data representation up to the following:

    1. After 6 months, only 1 total number for a month is required.
    2. After 2 years, 1 total number for each year is required.
    3. After 3 years, no data is required.

    Set these conditions under Time options.


  3. Join the time settings with your execution plan to enable them to come into effect. Open the execution plan and add "Post Aggregate" as a step.

Now your metric is calculated daily in your execution plan. In another plan you set the post aggregation that will recalculate the data. Select the metric to apply post-aggregation.


Here is the diagram with the time line.


  1. Initially, there are all daily values on the time scale.
  2. The second time line shows the example when the data load was requested for the period of 01/01/2014 to 01/01/2015 and we selected one check box "After 6 months switch to month." In this case, 6 months are subtracted from 01/01/2015 and starting from that point only monthly totals are shown.
  3. The third time line shows the example when two check boxes are selected: "After 6 months switch to month" and "After 2 years switch to years."

"Current moment" in the diagram means the last value of the data load interval, it may not correspond to the current actual time. For example, if now it is July 15, 8 a.m. and we requested data for one day for the period of 8 a.m., July,14th - 8 a.m. July,15th and the stores are still closed and have no sales/no data at 8 a.m., then the last available data is different in time with current time.

All monthly aggregations are rounded to the first day of the month. For example, if today is the 14th of July and you set "After 6 months switch to months," it means 6 months will be lapsed back from the 1st of July. So when the data for the first of August is available in the future, 6 months will be counted from that date.

If you set "Delete after 3 years," all data is deleted after this period.