Scheduled KPI datapoint variables can be of the following types:
- Datapoint
- Field
- Constant
Datapoint
References a value stored in another available datapoint. When using a datapoint while creating a scheduled KPI datapoint, you are given two options: Current Model and Related Model.
Current Model
The Current Model field displays the name of the model to which the Scheduled KPI datapoint is being added. It also lists the existing datapoints configured within that model.
Example: To store the hourly average temperature for a diesel generator, create a Scheduled KPI datapoint. Since the Diesel Generator model already has a Temperature datapoint, select it as the source and set the aggregation to hourly average to compute and store the required value.
Lists datapoints from models that are related to the current model.
When selecting a related model, ensure that its instances are linked to the current model through a Lookup field. Only values from instances that are associated via this Lookup relationship will be considered. If no such relationship exists, datapoint values from the related model cannot be used in the expression.
Example: Consider a scenario where you want to calculate a metric such as Hourly Fuel Efficiency. In this, the Energy Consumed datapoint is available in the Building model, while the Fuel Consumed datapoint is in the Diesel Generator model. To configure this, create the Hourly Fuel Efficiency datapoint in the Building model, select Energy Consumed as the current model datapoint, and choose the Diesel Generator model as the related model. Then reference its Fuel Consumed datapoint in the expression and apply hourly average aggregation to both values before calculating the ratio.
To establish a relationship, the instances must be linked through a Lookup field. For example, the Building 01 instance can be associated with the DG001 instance using a custom Lookup field named Connected Generator. This Lookup linkage allows the expression engine to correctly fetch the Fuel Consumed value from the associated Diesel Generator instance during calculation.

This ensures that, when calculating the Hourly Fuel Efficiency datapoint for Building 01, the Energy Consumed datapoint value from the Building 01 instance and the Fuel Consumed datapoint value from the associated DG001 instance are used together in the expression.
Aggregation function
KPI datapoints are executed at specific points in time. For a KPI datapoint to be computed, the value of the datapoint selected must be derived using an aggregation function that calculates values over a defined time period.
The following aggregation functions and time periods are available for configuration.
Aggregate Function | Output Value |
MAX | Maximum value of the datapoint value aggregated over the specified 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. |
STDDEV_POP | Population Standard Deviation of datapoint values aggregated within the specified period. |
STDDEV_SAMP | Sample Standard Deviation of datapoint values aggregated within the specified period. |
VAR_POP | Population Variance of datapoint values aggregated within the specified period. |
VAR_SAMP | Sample Variance of datapoint values aggregated within the specified period. |
PERCENT_IN_CONTROL | Percentage of the aggregated datapoint values that fall within the defined control limits during the specified period. |
Time Period
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 |
Example: To calculate the average temperature for the last 1 hour, configure the KPI datapoint with the AVG aggregation function and select Last 1 Hour as the aggregation timeline. The system aggregates all temperature values received during the last hour and stores the computed average when the KPI is executed.
Field
References the value from a numerical field configured in the model that accepts user input. When using a field while creating a scheduled KPI datapoint, you are given two options: Current Model and Related Model.
Current Model
Lists fields configured in the same model to which the datapoint is being added. The value entered for the field in the device, asset, or location instance based on the current model is used in the computation.
Example: To calculate the average daily energy consumption per person, you can add a custom field to the Building model called “Today’s Head Count.” This field will be available under the current model datapoints. You can then use it along with the yesterday aggregated Energy Consumed datapoint to compute the per-person daily consumption while configuring the expression.
Lists fields from models that are related to the current model.
When selecting a related model, ensure that its instances are linked to the current model through a Lookup field. Only values from instances that are associated via this Lookup relationship will be considered. If no such relationship exists, field values from the related model cannot be used in the expression.
Example: If you want to store the per-person fuel consumption, the Fuel Consumed datapoint will be in the Diesel Generator model, while the Today’s Head Count field will be in the Building model. In this case, you can create a scheduled KPI datapoint and configure it to aggregate the day’s total Fuel Consumed value from the Diesel Generator model, then divide it by the Today’s Head Count field from the related Building model.



To enable this calculation, the Diesel Generator instance must be linked to the corresponding Building instance through a Lookup field. This ensures that, during KPI execution, uses the Today Head Count field value from the related Building instance to compute the per-person fuel consumption accurately. For example, the Building 01 instance can be associated with the DG001 instance using a custom Lookup field named Connected Generator. This Lookup linkage allows the expression engine to correctly fetch the Fuel Consumed value from the associated Diesel Generator instance during calculation.
This ensures that, when calculating the Hourly Fuel Efficiency datapoint for Building 01, the Energy Consumed datapoint value from the Building 01 instance and the Fuel Consumed datapoint value from the associated DG001 instance are used together in the expression.
Constant
A user-defined numeric value that remains the same for all computations.
Example: To convert temperature from Kelvin to Celsius, a constant value of 273.15 is used in the expression. This value remains unchanged regardless of the incoming Celsius temperature.
How to Build an Expression
Expression are created while creating or configuring a new datapoint.
Simple Expression
For a basic expression, fill two variable fields in a row with an operator to compute a value.
Consider a JSON payload where the distance value is measured and sent in centimetres but needs to be converted to millimetres.