Functions

The conditional expression language supports these built-in functions, which fall into three distinct categories:

  • Table functions, which perform actions on values across all rows in the report table.

  • Row functions, which perform actions on a single row.

  • External functions, whose values come from a source other than NaviPlex report data and do not depend on the current row.

Note: You can mix function types in a single expression and nest them within each other.

Table Functions

NaviPlex table functions are similar to SQL column functions, aggregate functions, or set functions. Both NaviPlex table functions and SQL column functions operate on more than a single row. NaviPlex table functions and SQL column functions have these differences:
  • The scope of NaviPlex table functions cannot be modified by qualifiers such as GROUP BY, HAVING, or DISTINCT. They always operate on the entire report table.
  • Their arguments may contain other column functions. For example:

    SUM (SUM(CPU-SUM(CPU)/COUNT(1) > 0 ) * SERVICE_UNITS) is illegal in SQL, but is valid in NaviPlex.

  • Row (scalar) values and table functions can be freely intermingled in the same expression. For example:

    SUM(CPU) - CPU is illegal in SQL, but is valid in NaviPlex.

This table describes table functions:

Function

Example

AVG(expr)

Short for SUM( expr )/COUNT(1).

AVG(CPU+SRB)

COUNT(expr)

Returns the number of rows for which the expression(expr) is true.

COUNT(CPU_PCT > 90)

MAX(expr)

Evaluates the expression (expr) for each row and returns the maximum value.

MAX(TOT_SRV_UNITS - SRB_SRV_UNITS)

MIN(expr)

Evaluates the expression (expr) for each row and returns the minimum value.

MIN(TOT_SRV_ UNITS)

OCCURS(expr)

Short for COUNT( expr ) > 0.

OCCURS(CPU_PCT > 90)

SUM(expr)

Returns the sum of the values of the expression (expr) for each row.

SUM(IO_COUNT)