Understand Scheduled KPI Datapoints

Understand Scheduled KPI Datapoints


Scheduled KPI datapoints are computed values based on expressions, with datapoint values from the same model, related models, and field configured for the model, aggregated using a function over a period. These expressions are executed at defined intervals.
 
A computational expression consists of field values, constant values, datapoints, and mathematical operators. Learn more about how each filed is used and how an expression can be configured in expression builder for datapoints.
 
For scheduled KPI datapoints, the available Aggregation Functions and period of aggregation are tabulated below.
 
Aggregate Function
Output Value
MAX
Maximum value of the datapoint value aggregated over the specifie period.
MIN
Minimum value within the datapoint value aggregated over the set period.
SUM
Summation of all the datapoint values aggregated over the set period.
AVG
Average of all the datapoint values aggregated over the set period.
FIRST_VALUE
First datapoint value received within the set period.
LAST_VALUE
Last datapoint value received within the set period.
 
Aggregation Timeline
Last 1 Hour
Last 6 Hours
Last 12 hours
Today
Yesterday
Last 7 Days
Last 30 Days
Last Week
Last Month
Last 24 Hours
This Week
This Month
 
Consider a scenario where you need to calculate the daily cost of energy consumption. The energy meter sends the current consumption data every 10 minutes in a JSON format, which is stored in a realtime datapoint called "Energy Consumed."



Additionally, the energy rate, which changes monthly, is stored in a custom field called "Energy Rate" in the managed entity instance. This field allows the user to input the current energy rate manually.
 
 
To compute and store the daily cost of energy, a Scheduled KPI datapoint is created. This datapoint uses expression with a SUM function to aggregate all the values from 'Energy Consumed,' and with the period defined as 'Today,' only the values for the current day are used.
 
The total consumption is then multiplied by the value in the 'Energy Rate' field, thus calculating the total cost of energy for that day. The Scheduled KPI datapoint now stores the daily energy cost.
 
 

See Also