Skip to content

Particular features of multidimensional formulas

Syntax

For multidimensional formulas, the TGKML MD syntax is used (see Calculation logics of "Multi-Dimensional Script" type ). Some specific elements are described below.

Element Description
TGKML 1.0 header Syntax required at start of script. It has the following characteristics: - mandatory in an MD Calculation Logic. - to be omitted in MD-type FST formulas.
The reserved @output clause This identifies, on the cell containing the MD formula, the result returned by the calculation on a temporary account. This clause is reserved and case-sensitive. For example, @output :={010, 50010}+{010, 50020};.
Parent FST items associated with relationships dependent on the account dimension only It is the only type of FST item to which the MD formula can refer.

Constructing multidimensional formulas

When constructing multidimensional formulas, the following restrictions must be respected:

  • It is not possible to use temporary accounts as entire parameters of the ‘time skip’ or ‘number of months’ functions, for example Lag(), Span().
  • As an MD financial statement template can also be used on reporting forms (which are therefore not linked to a specific process), when reference is made to a company node (Entity.[|NN] syntax), the user must specify the organisational hierarchy being referred to, i.e. the organisational hierarchy specified in the definition of the data collection process.
  • The conversion functionality (ConvertOriginal) is not available.
  • Assignments to physical accounts to write to the database cannot be defined within a multidimensional formula, but it is possible to use assignments to temporary accounts, which can be reused to calculate the final result (identified by the @output specification. If there are several records in the temporary @output account at the end of the script, the amounts will be added up.
  • The final result is always a dimensionless number, and so the output Pro directive (conversion of periodic result into Year-to-date value) does not need to be specified.

Particular features of cells with multidimensional formulas

Cells containing multidimensional formulas have the following characteristics:

  • The script for a multidimensional cell is run separately for every cell in which it appears, applying at runtime all the specific filters set for the cell.
  • The currency is always the one indicated for the cell of the form to which the calculation is being applied.
  • The amount in the company currency coincides with the amount in the original currency.
  • Data are always read from the cube identified by the definition of the matrix in which the financial statement template is being used.
  • The result of a multidimensional formula is always a number shown on the relative cell of the report, and not an n-tuple saved in the database.