Reading from fixed point

In some cases it is necessary to define a TGKML script where a given amount has to be read from a dimension's specific element; for example the products' price might be saved to a specific XY element of the custom dimension 2.

This requires the concept of reading from fixed point which allows to specify the element from which a given amount has to be read.

The syntax to use for defining the reading from fixed point is:

Dimension.[...]

The syntax to use in case of reading from fixed point on FST item (input) is:

{,,Dimension.[...]}

For example it possible to write

  • [20132](Dest2.[XY]) to specify that the value of the account 20132 is read only from the XY element of the custom dimension2;
  • [20132](Time.[2009|12]) to specify that the value of the account 20132 is read only from the 2009 / 12 scenario / period;
  • [20132](Dest2.[01|XY]) to specify that the value to read for the account 20132 is the sum of all the custom dimension 2 elements which are related to the sub-tree of the hierarchy 01 whose root is the XY node;

  • [20132](Dest2.Null) to specify that the value to read for the account 20132 is the sum of all elements with custom dimension 2 equal to null;

  • [20132](Dest2.NotNull) to specify that the value to read for the account 20132 is the sum of all element with custom dimension 2 different from null.

When the reading from fixed point function is used, the system "removes" the X dimension (with constant value) from the input data set. Namely, if we assume we have the following input data set:

Entity Account Scenario Category Dest1 Dest2 Amount
A00 X00000 2013BDG $AMOUNT GEN GEN 150

and that we define the Input part of the script as follows:

… := [X00000](Dest1.[GEN], Dest2.[GEN])

Thus the system reads the following set of data:

Entity Account Scenario Category Amount
A00 X00000 2013BDG $AMOUNT 150

This does not happen if we use an input filter. Namely, if we assume we define the Input part of the script as follows:

… := [X00000](Dest1.Filter([GEN]), Dest2.Filter([GEN]))

Thus the system reads the following set of data:

Entity Account Scenario Category Dest1 Dest2 Amount
A00 X00000 2013BDG $AMOUNT GEN GEN 150

In this way, if we assume we have

[LO].[D00000]:= [X00000](Dest1.[GEN], Dest2.[GEN]) * [C00000]

where [C00000] has on the database the following values

Entity Account Scenario Category Dest1 Dest2 Period Amount
A00 C00000 2013BDG $AMOUNT GEN GEN 01 10
A00 C00000 2013BDG $AMOUNT D11 D22 01 20
A00 C00000 2013BDG $AMOUNT D12 D22 01 5

the result is:

Entity Account Scenario Category Dest1 Dest2 Period Amount
A00 D00000 2013BDG $AMOUNT GEN GEN 01 150*10
A00 D00000 2013BDG $AMOUNT D11 D22 01 150*20
A00 D00000 2013BDG $AMOUNT D12 D22 01 150*5

while, in presence of an input filter

[LO].[D00000]:= [X00000](Dest1.Filter([GEN]), Dest2.Filter([GEN])) * [C00000]

the result is:

Entity Account Scenario Category Dest1 Dest2 Period Amount
A00 D00000 2013BDG $AMOUNT GEN GEN 01 150*10