In this article:

Inserting System Functions

Inserting Custom Functions and Methods

Inserting Operators

Example of Inserting Functions and Operators into Expression

Inserting Functions and Operators

A function is a sequence of operations executed with an operand on calculating expression. Operator is an action performed with operand on calculating expression. In expression editor functions and operators can be inserted by means of the functions panel or entered from keyboard.

The following can be inserted:

Available functions and operators depend on the object, for which an expression is created.

To get a brief description of function or operator, select it on the functions panel. The description is displayed at the bottom of the panel. The desktop application enables the user to get a link to a full description of function or operator. To do this, click the Full Description link located at the end of the brief description.

TIP. If it is required to view description of function or operator used in the expression, open the context menu and select the Description item to view brief description on the data panel, or the Help item to view the help for the selected function or operator. The option is available only in the desktop application.

Show and hide functions panel

Inserting System Functions

System functions are available in the expression editor right after Foresight Analytics Platform installation.

NOTE. If the data provider does not contain a calendar dimension, the functions using calendar dimension are unavailable in the expression editor. If a data provider contains several calendar dimensions, the dimension, for which the Timeline type is specified.

Available system functions

To insert system function:

  1. Select the Functions radio button on the functions panel. All available functions are displayed. For example:

  1. Select the function in the list or find it by means of search.

  2. Execute one of the operations:

NOTE. System functions are also represented by time and dummy variables. They can be inserted only from the functions drop-down list. To call it put the cursor to the expression area and press CTRL+SPACE. In the displayed list, select the required time or dummy variable and double-click it. It will be inserted to the cursor position. For details see the 

  1. The function is inserted into the expression area to the cursor position. Brackets for entering function parameter values are inserted at the same time. If there are several parameters, they are separated with a comma. For example, the SubTotal function looks as follows right after it is inserted into the expression area:

SubTotal(, , )

  1. Enter function parameter values one by one.
    The desktop application can display a tooltip for the current parameter, and a tooltip with available parameter values. To do this, put the cursor to the required parameter and press CTRL+SPACE. All available tooltips are displayed, for example:

The tooltip for the current parameter is displayed at the top, the tooltip with available parameter values is displayed at the bottom. The following can be used as parameter values:

As a result, the function is inserted into the expression, for example:

SubTotal({Coal mining[t]},null ,PivotTotalPosition.Columns)

TIP. If name of the function to be used is known, it can be entered from keyboard. A tooltip with parameters and function parameter values is automatically displayed in the desktop application.

Inserting Custom Functions and Methods

Custom functions and methods can be used to enhance expression capabilities due to the use of custom calculation methods. The functions to be used must be written in the Fore language, must have the Public identifier, and must be saved in the current repository.

To insert custom function:

  1. In the expression area, put the cursor to the position where the custom function must be located.

  2. Enter the full path to the function:

<Unit identifier>.<Function name>

  1. If an application function contains parameters, enter them in parentheses right after the full path to the function.

As a result, the application function is inserted into the expression, for example:

CALCFUNC.UserCalculation({Number of companies[t]}, 100)

TIP. If it is required that your application function is displayed in the list of system functions, connect it on the functions panel into the Custom Functions special category. Such functions are inserted similarly to system functions. For details see the Connecting Custom Functions section.

Inserting Operators

Operators are used to mark operations executed with operands.

Available operations

To insert an operator:

  1. In the expression area put the cursor to the position where the operator should be placed.

  2. Enter the operator using keyboard or select the Operators radio button on the functions panel. All available operators are displayed. For example:

  1. Select operator in the list or find it by means of search.

  2. Click the Insert into Formula button or double-click the operator or drag it to the expression area.

As a result, the operator is inserted into the expression area.

Example of Inserting Functions and Operators into Expression

The example is used to create an expression by means of functions and operators. Indicator's annual values in roubles and US dollar rate are used to calculate indicator value in US dollars and is interpolated to the semi-annual frequency:

See also:

Inserting Operands | Creating Formulas and Expressions