Show TOC

Syntax documentation*CALC_ORG Locate this document in the navigation structure

Allowed uses: By Commit/Global, MDX, SQL

A special instruction can be inserted between WHEN / ENDWHEN structures, to calculate the parent members of a selected hierarchy. Its syntax and behavior are exactly the same as the STORE_ORG instruction. The main difference from STORE_ORG is that CALC_ORG does not require that it is written between COMMIT instructions, and does not enforce a posting of the data to the database, until a subsequent COMMIT is found.

Its syntax is: *CALC_ORG {DimensionName} = {OrgProperty}

Example Example

*WHEN…

// some calculation...

*ENDWHEN

*CALC_ORG ACCOUNT = PARENTH1

End of the example.

In the above example the results of the preceding calculations are included in the calculation of the parents of PARENTH1 org.

The CALC_ORG instruction automatically enforces a double GO instruction (before and after its execution). For this reason, no other instruction needs to be inserted between it and the preceding WHEN / ENDWHEN structures, nor the following ones.

Calculating orgs in memory

If the calculated members generated by a CALC_ORG instruction do not need to be posted to the database, you can use a variation of the CALC_ORG instruction that does not add these extra records to the database, even when the COMMIT instruction is reached.

The instruction is: *CALC_DUMMY_ORG {DimensionName} = {OrgProperty}

A valid alternative syntax is: *CALC_ORG {DimensionName} = {OrgProperty}, DUMMY

This instruction =automatically adds a pound sign (#) in front of the generated member Ids. As a result these records are considered memory variables that are not posted to the database.

The dummy members generated with this technique do not exist in any dimension, even if generated from real members. For this reason, it is not possible to use in the logic any property assigned to them. They can only be referenced using their ID.