Conditional
The Conditional drop-down list provides functions to filter data so that only values that are within the parameters of the conditional statement are included in the result set.
Where
This conditional operator must precede all others. The Where statement must be used before any other conditional operator to properly initiate a conditional test.
Examples:
To return the delta of "Electricity consumption" between 6AM and 2PM, use
Delta("Electricity consumption") Where TIME > 06:00 AND TIME < 14:00
To get the maximum recorded room temperature while occupied, use
Max("RmT") Where Value("OCC") = 1
AND
Used to evaluate two or more expressions and only produces a result when both or all expressions are TRUE.
For example, Value("point_name") Where Value("point_name") > 7 AND Value("point_name") < 20
OR
Used to evaluate two or more expressions and only produces a result when at least one of the expressions is TRUE.
For example, Value("point_name") Where Value("point_name") < 7 OR Value("point_name") > 20
NOT
Used to reverse the logic of another conditional operation.
- = (equals) — Used to compare a point value to a number or other point and produces a result when both values are equal. Be aware of decimal places and accuracy. A value of 7.4999 does not equal 7.5. And truncating both values to one decimal place only produces values of 7.4 and 7.5.
- <> (not equal) — Used to compare a point value to a number or other point and produces a result when both values are not equal.
- > (greater than) — Used to compare a point value to a number or other point and produces a result when the first point is greater than the second.
- >= (greater than or equal) — Used to compare a point value to a number or other point and produces a result when the first point is greater than or equal to the second.
- < (less than) — Used to compare a point value to a number or other point and produces a result when the first point is less than the second.
- <= (less than or equal) — Used to compare a point value to a number or other point and produces a result when the first point is less than or equal to the second.
DOW (Day of the Week)
Returns a value when the day of the week comparator is matched.
For example, Value("point_name") Where DOW = Tue returns data that falls on a Tuesday. Valid options include: Sun, Mon, Tue, Wed, Thu, Fri, and Sat.
DOM (Day of the Month)
Returns a value when the day of the month comparator is matched.
For example, Value("point_name") Where DOM = 7 returns data that falls on the 7th of any month. Valid options include: 1-31.
TIME
The TIME conditional uses the 24 hour clock, and returns a value when the TIME comparator is matched. Valid options include: 0:00 - 23:59.
For example, Value(“point_name”) Where TIME < 8:00 OR TIME > 16:00 could be used to find the value of any “point_name” less than 8am and greater than 4pm.
© 2019 Reliable Controls Corporation. All rights reserved. Published October 29, 2019