Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The expression string supports:

    • Variables and functions

    • Number expressions (resulting in either an Integer or BigDecimal, but not double/float) 

    • String expressions

  • Literal strings have to be quoted using the double quotes (")

  • Supported operators are: ( ) + - * / ^ and or < <= > >= = <> % not inv

Info

The + operator can be used for the concatenation (i.e., "a" + "b" -> "ab") in Data Source and Datamart field expressions. It is not applicable as an expression within Charts.

General Functions

Function

Description

ISNULL(arg1)

Returns a Boolean value indicating whether a specified expression contains no valid data (null).

IF(cond, value when true, value when false)

Evaluates a condition. Argument2 and 3 have to have the same data type.

Sample SQL: case country when 'Italy' then 'OK' else 'NAH' end

IFNULL(arg1,arg2)

== IF(ISNULL(arg1), arg2, arg1)

== COALESCE(arg1,arg2)

NULLIF(arg1,arg2)

Returns the first expression if the two expressions are not equal.

TOSTRING(arg1)

==  CAST(arg AS VARCHAR)

TODATE(arg1)

==  CAST(arg AS DATE)

PARSE(arg1,arg2)

Argument1 is literal, argument2 is literal string, e.g. "STRING".

For argument2, allowed values are: STRING, NUMBER, DATE, BOOLEAN, DATETIME, LOB, LONG

SQL0 - SQL5(arg1-arg6)

An SQL query with formula: SQL<n>("SQL expression with <n> inputs represented by %s placeholders", field1, ..., field n)
Example: SQL1("date_part('month',%s)",InvoiceDate)

CEILING(arg1)

The nearest integer greater than or equal to the argument.

FLOOR(arg1)

The nearest integer less than or equal to the argument.

ROUND(arg1,arg2)

Rounds to the specified number of decimals: round(42.4382, 2) = 42.44

...