Search
Generic filters
Exact matches only
  1. Home
  2. Knowledge Base
  3. User Guide
  4. Using Relative Time Functions in Visual KPI
  1. Home
  2. Knowledge Base
  3. Visual KPI Designer (Configuration)
  4. Using Relative Time Functions in Visual KPI

Using Relative Time Functions in Visual KPI

Time is an important element for KPIs. Whether it be a visualization that calls for a specific time range, or a trend with custom start and end times, Visual KPI offers a powerful set of relative time functions, letting you dream up all kinds of crazy or powerful scenarios you may want to capture and display.

Watch a video about how Time Functions work in Visual KPI.

Where Relative Time is Used in Visual KPI

You can configure and use relative time functions in three ways:

Site-wide settings (Visual KPI Designer):

You can set site-wide default ranges in the Chart Ranges, Default Ranges and Chart Dates sections of the Visual KPI Designer. These default settings can be overridden by changing the settings on individual objects such as Groups, KPIs or charts. These settings also determine what ranges will be available in the drop-down list for end users.
relative time functions

Object-specific settings (Visual KPI Designer):

You can configure custom time ranges for individual objects in the Visual KPI Designer.

Ad-hoc changes (in the web browser):

Adjust time parameters of a visualization (e.g. trend, XY plot, etc.) in your Visual KPI site to change the range of data shown.
relative time function

Static vs. Relative Time

Time, in Visual KPI can be static or relative.

Typically, time functions are used to create chart and trend ranges. You can use a time function to tell Visual KPI a specific, or static, date and time to start and end when viewing data. You can use relative time, such as telling Visual KPI to pull a trend that starts at midnight “yesterday”, with “yesterday” as a time relative to when you ask for the data.

Offset Time Functions

You don’t have to select data for a specific time in Visual KPI. You can use offset time, which means that you call data based on specific time plus or minus another time function.

Here’s what we mean by offset time:
Let’s say you want to know the volume of goods manufactured “in the last 24 hours” from right now. You could use the relative of “now” (represented by the * symbol), minus (-) 1 day. The function would look like this: *-1day

Combining Time Functions

You can keep it simple or make it as sophisticated as you want when using Visual KPI’s relative time functions. Using the symbol for “now”(*) as your end time, the right edge of your trends will show the most recent value available from your data source(s) for that item. If you use the function “y” as your end time, the right edge of your trend would show the most recent value before midnight yesterday. The same is true of course for start times.

You can also combine functions to get something crazy (or powerful, if you prefer), like a start time defined as “go back 12 days, then show the beginning of whatever month that is, and then show the what the value was at noon on that day.” Using relative time functions in Visual KPI, that would be represented as “noon(bom(*-2d)).”

In the following image, you can see two trends we created using the following functions:

  • MFS2: starttime = bom(*), endtime = bom(*+1mo)
  • MFS1: starttime = bom(*), endtime = *

relative time functions

We’ve created some examples of how you can combine relative time functions.

Examples

  • Beginning of this month = bom(*)
  • Beginning of next month = bom(*+1mo)
  • Start of this year = boy(*)
  • Start of last year = boy(*-1y)
  • Start of next year = boy(*+1y)
  • Noon of the most recent Saturday = noon(Sa(*))
  • Noon of the beginning of last year = noon(boy(*-1y))
  • Noon of the Saturday prior to 46 weeks ago: noon(sa(*-46w))

Learn more

Visual KPI Relative Time Functions Table

Was this article helpful?

Related Articles