Skip to end of banner
Go to start of banner

Calculated Fields

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Introduction

The calculated fields feature allows you to make calculations on numeric and textual fields inside the report itself, so there is no obligation to export the report to Excel. In addition, there is full support for filtering the fields according to the calculation results.

This feature can also be used in schedule reports, saved as favorites, etc.

Basic points

  • All static text/strings that aren’t supported functions (like If & swap) or operations (like +, (), and params separating commas)  must be written inside of single quotes

  • The engine is case-insensitive when using functions names

  • We support using single quotes inside a value only by prefixing them with the escape string(\) i.e. a formula can look like this: 'unit_name' + ' Te\'st' and the result will be unit name Test

Supported Mathematical Functions

  • Basic mathematical functions





    Simple concatenation function, using the plus sign. i.e. : 'Daniel unit' + ' Test' -> Daniel Unit Test.

  • Advanced numerical mathematical functions

Function

Explanation

Examples


MIN/MAX

The function will display the smallest number between two or more conditions

Min(unit_id; 1000)

Max(unit_id; 13.5)

AVG

The function will display the average between two or more conditions


AVG(a1; a2; a3; ...)

ABS

The ABS function returns the absolute value of the given number


ABS(-10)



IF

The “IF” function is a decision-making condition function between numerical fields.
The function will take its first param and run it in a numeric engine. We can use this feature only inside of an if operation, like this: IF( Num(‘2 > 1’), ‘Yes’, ‘No’ ) -> Yes



IF(unit_id > 1000; 10; 9)

  • Advanced Textual functions

    (warning) You must use a semicolon (;) sign to separate the clauses in the equation instead of a regular comma.

    (warning) The "combined" condition must be accompanied by parentheses in order for it to function properly.

    IF(('unit_is_stationary' = 'Yes') && ('unit_is_stationary' = 'Yes'); 'OK';'Not OK')

Function

Explanation

Examples

SWAP

The function will convert a numeric field to a text field

Swap(’real_time_status’ ; ‘0:Down’ ; ’999:Off Grid’)




IF

The “IF” function is a decision-making condition function between textual fields.

IF operation – syntax: IF(‘a’ ; ’b’ ; ‘c’) -> if “a” is true then “b” else “c”. We support the following Boolean operations in text fields:

‘a’ = ‘a’ -> True

‘a’ != ‘a’ -> False




IF('unit_name' = ‘arkadi test’ ; ‘true’ ; ‘false’)


Calculation Field Creation

The process of creating a calculated field is detailed in the following link

  • No labels