Skip to content

Definition of a 'Sum' calculation logic with dimensional specifications

Definition of a "Sum" calculation logic with dimensional specifications

Dimensional specifications can be defined in the Sum calculation logics

  • header: from the "Filter on Dimensions” tab in the calculation logics window;
  • detail: from a Sum calculation logic's input accounts definition window. In this case the specifications are defined for each input account.

Definition of a set of codes

Given a dimension, in order to define a set of elements, it is possible to use a sort of syntax to combine single elements or nodes of a hierarchy. The expression is given by a simple algebra. The atoms are:

  • simple codes between square brackets (example: [C001])
  • nodes of a hierarchy where, the hierarchy code is between square brackets and separated from the node's code by the symbol “|” (example: [$|N01])
  • all the elements of a dimension (All)

The operators (that follow the usual order of precedence among operators) are:

  • union + (example: [C001] + [$|N01])
  • intersection * (example: [C001] * [$|N01])
  • subtraction - (example: [G|S01] - [$|N01])
  • brackets (example: ([C001] + [$|N01]) * [C002])

Filters

A filter allows you to "limit" the set of input data to run.

The dimensions on which a filter can be applied are the category, the custom dimensions and the entity.

In order to define a filter on a specific dimension, it is necessary to deselect the "override" field, in the "Filter on dimensions" tab of the calculation logics window. For further details, please see the following paragraphs about the management of overrides and reading from fixed point.

The filters can be defined at two levels:

  • header: these filters can be defined by inserting a code set in the "Filter" field related to the chosen dimension. The filter will be applied to all the input accounts, limiting the reading of data to a specific subset of the filtered dimension. For example, a Sum calculation logic may read and write only on a subset of the cost centres.
  • single account: these filters are specific for an input account or an accounts node. They can be defined from the detail window by inserting a code set into the “Filter ” column. The filter will limit the reading of an input account to a specific subset of the filtered dimension. For example, an input account among those that define the logic may have to be read only on a subset of the cost centres.

The definition of several filter levels (run filters, header filters, filters on single account) is interpreted on the input accounts as a filtering on the subset where the defined filters levels intersect. For example, when running a Sum calculation logic with a header filter on an A subset of the cost centres and then selecting a run filter on a B subset of the cost centres, the logic will be run on the A/B intersection subset.

Whereas, when running a Sum calculation logic with a header filter on an A subset of the cost centres and specifying for a single input account a filter on a B subset of the cost centres, such account will be read only on the A/B intersection subset.

The following examples show how to define a "Sum" type calculation logic with dimensional specifications.

Example 1

Let us assume:

  • that the account 10110 is defined as the sum of the accounts 10110_010 and 10110_040;
  • code set [D11]+[D13] has been defined as header filter on Custom Dim1;
  • the filter has been defined on the custdim1 [D11] on the account 10110_010 ;
  • the following set of input data is available:
Account CustDim1 CustDim2 Amount Origin
10110_010 D11 D21 150 INPUT_WEB
10010_010 D12 D22 80 INPUT_WEB
10110_010 D13 D22 65 INPUT_WEB
10010_040 D11 D21 30 INPUT_WEB
10010_040 D12 D21 10 INPUT_WEB
10010_040 D13 D22 50 INPUT_WEB

The system will read the following set of data:

Account CustDim1 CustDim2 Amount Origin
10110_010 D11 D21 150 INPUT_WEB
10010_040 D11 D21 30 INPUT_WEB
10010_040 D13 D22 50 INPUT_WEB

Following data will be written on the database after the data processing:

Acocunt CustDim1 CustDim2 Amount Origin
10110 D11 D21 150 + 30 PROC_CALCULATED
10010 D13 D22 50 PROC_CALCULATED

Override and reading from fixed point

Override

It enables you to define a specific value to be assigned to a given dimension when writing data. For example, you may need to attribute a specific category to the output account. The override can be defined from the "Override" field of the corresponding dimension.

The dimensions on which it is possible to apply the override are the category and the custom dimensions.

It is not possible to write data outside the run filter. If a Sum calculation logic tries to write outside the filter by defining an override, the system does not run the logic and records an error message on the audit.

It is not possible to define the override on the category of a logic on which the "Run on journals" option is enabled.

Example 1

Let us assume that:

  • the account 10110 is defined as the sum of the accounts 10110_010 and 10110_040;
  • the element [D05] has been set as override on CustDim1;
  • the following set of input data is available:
Account Custdim1 Custdim2 Amount Origin
10110_010 D11 D21 150 INPUT_WEB
10010_010 D12 D22 80 INPUT_WEB
10010_040 D11 D21 30 INPUT_WEB
10010_040 D12 D21 10 INPUT_WEB

Following data will be written on the database after the data processing:

Account Custdim1 Custdim2 Amount Origin
10110 D05 D21 150 + 30 + 10 PROC_CALCULATED
10010 D05 D22 80 PROC_CALCULATED

Reading from fixed point

If an override has been defined for a specific dimension, on such dimension it will be also possible to specify the subset of source elements.

The reading from fixed point can be defined:

  • on header: it can be defined by inserting a code set in the "Filter" field related to the chosen dimension. The reading from fixed point will be applied to all the input accounts on which no specific subset has been defined, limiting the reading of data to a specific subset of the dimension. For example, you may read only on a subset of cost centres.
  • on account: it can be defined from the detail window by inserting a code set into the “ input” column. This will limit the reading of an input account to a specific subset of the filtered dimension and it prevails over the one defined on header. For example, an input account may have to be read only on a subset of the cost centres.

Example 1

Let us assume that:

  • the account 10110 is defined as the sum of the accounts 10110_010 and 10110_040;
  • the code set [D05] has been defined as override on custdim1;
  • the code set [D11]+[D13] has been defined as header reading from fixed point on custdim1;
  • the reading from fixed point has been defined on [D12] cusdim1 on the account 10110_010;
  • the following set of input data is available:
Account Custdim1 Custdim2 Amount Origin
10110_010 D11 D21 150 INPUT_WEB
10010_010 D12 D22 80 INPUT_WEB
10110_010 D13 D22 65 INPUT_WEB
10010_040 D11 D21 30 INPUT_WEB
10010_040 D12 D21 10 INPUT_WEB
10010_040 D13 D22 50 INPUT_WEB

the system will read the following set of data:

Account Custdim1 Custdim2 Amount Origin
10110_010 D12 D22 80 INPUT_WEB
10010_040 D11 D21 30 INPUT_WEB
10010_040 D13 D22 50 INPUT_WEB

Following data will be written on the database after the data processing:

Account Custdim1 Custdim2 Amount Origin
10110 D05 D21 30 PROC_CALCULATED
10010 D05 D22 80 + 50 PROC_CALCULATED