The application allows formulas to be defined, in virtual meters, widgets or alerts. These are used to specify calculations that will be made dynamically from stored data from physical meters.
Conditions
IF(logical_expression, true_result, false_result)
Allows you to determine a result based on a condition. If logical_expression is true, then instruction1 is returned, otherwise instruction2 is returned.
For the condition, we can use the following operators:
-
=to test for equality -
!=to test for inequality -
>=,>,<=,<to test superiority, strict superiority, inferiority and strict inferiority respectively. -
ANDcan be used between 2 conditions to test whether they are true simultaneously (AND operator) -
ORcan be used between 2 conditions to test if at least one of them is true (OR operator)
Constants can be used: true (true), false (false), and null (to force a missing value).
Exemples
IF(meter > 10, 1, 0)
Returns 1 if the counter is greater than 10, otherwise returns 0.
Replacing missing values
DEFAULT_ZERO(expression)
Replaces missing values (null) in the expression with 0.
Exemple
DEFAULT_ZERO(meter1)
Returns meter1 with the value zero in place of missing values (depending on meter time step).
Commentaires
0 commentaire
Vous devez vous connecter pour laisser un commentaire.