Simple Calculated Field
Simple calculated fields compute a real-time value using a single mathematical expression —
no scripting required. For example, given temperature and humidity telemetry, a one-line expression
computes the dew point and stores it as dewPoint the moment new data arrives
(see the example below).
Use Simple when you need:
- Derived sensor metrics (dew point, heat index, power = voltage × current)
- Normalization and scaling (calibration factors, unit conversions)
- Differences and simple scoring (for example, supply minus return temperature)
- Cross-entity calculations (combine device telemetry with asset attributes)
Configuration
Section titled “Configuration”- Open the Data processing ⇾ Calculated fields page.
- Click the + Add calculated field ⇾ Create new calculated field in the top-right corner.
- In General, enter a title, specify the entity the field applies to, and select the Simple type.
- Add Arguments, write the Expression, and configure Output.
- Click Add to save.
Arguments
Section titled “Arguments”Simple fields support Latest telemetry and Attribute argument types. The data source can be the current entity, another Device or Asset, the Customer, the current tenant, or the current owner.
For full argument configuration details, see Calculated Fields — Arguments.
Expression
Section titled “Expression”In the Expression field, write a single mathematical formula that references your arguments
by name (e.g., temperature, humidity).
Supported operations and functions:
| Category | Supported |
|---|---|
| Operators | +, -, *, /, ^ (power), % (remainder), unary - |
| Basic functions | abs, sqrt, cbrt, pow, exp, expm1, signum, ceil, floor |
| Logarithms | ln and log (natural), lg and log10 (base 10), log2, log1p, logab(a, b) (logarithm of b to base a) |
| Trigonometry (radians) | sin, cos, tan, cot, asin, acos, atan, sinh, cosh, tanh |
| Constants | pi, e |
Other functions, such as min, max, or round, are not supported. A field that uses them saves, but every calculation fails with the error Unknown function or variable in the debug events. Use a Script calculated field instead. To round the result, set Decimals by default in Output.
Arguments can’t be named e, pi, or ctx. Boolean arguments are used as 1 and 0, and string values are converted to numbers. A string that isn’t a number makes the calculation fail with Argument ‘…’ is not a number.
The expression can be up to 255 characters long. Separate its parts with at most one space: two or more spaces in a row make the field show Expression is invalid.
The expression produces one result value, stored under the configured output key.
Output
Section titled “Output”| Field | Description |
|---|---|
| Output type | Time series or Attribute |
| Time series key / Attribute key | The name under which the computed value is saved — the field label matches the selected Output type |
| Decimals by default | Optional decimal rounding |
| Use latest timestamp | Time series only, off by default — stores the result using the most recent argument timestamp instead of server time. Enable it if you plan to reprocess the field |
For output strategy options, see Calculated Fields — Output Strategy.
Example: Dew Point Calculation
Section titled “Example: Dew Point Calculation”A Greenhouse sensor device sends temperature (°C) and humidity (%) as telemetry in real time.
Goal: compute dewPoint and store it as a time series key on the same device.
Configuration Steps
Section titled “Configuration Steps”- Open the Data processing ⇾ Calculated fields page.
- Click the + Add calculated field ⇾ Create new calculated field in the top-right corner.
- In General:
- Title: Dew point
- Entity type: Device, then select Greenhouse sensor. The default entity type is Device profile: keep it to calculate the dew point for all devices of a profile.
- Type: Simple
- Click Add argument:
- Entity type: Current entity
- Argument type: Latest telemetry
- Time series key:
humidity - Argument name:
humidity
- Add a second argument for
temperaturewith the same settings. - In Expression, enter:
243.04 * (ln(humidity / 100) + 17.625 * temperature / (243.04 + temperature)) / (17.625 - (ln(humidity / 100) + 17.625 * temperature / (243.04 + temperature)))
- In Output:
- Output type: Time series
- Time series key:
dewPoint
- Click Add.
Result: Each time temperature or humidity is updated, dewPoint is recalculated and stored
as a new telemetry entry on the Greenhouse sensor device.
Was this helpful?