Referencing custom totals in a compute statement

Custom totals can be referenced in a compute statement with the syntax total. Referencing custom totals allows a compute statement to use a custom total to retrieve balances from the GeneralLedgerTotal cube data. These are the parameters included in the total syntax:

(total(BusinessViews.Total Name, BusinessClass.Field1 = Override Value, BusinessClass.Field2 = Override Value, BusinessClass.FieldN = Override Value).Measure)

Where:

Parameter Description
total The syntax to indicate that the total is used.
BusinessViews A business view or an address that holds the balances or totals to be obtained. For example, GeneralLedgerTotal.
Total Name The name of the custom total.
BusinessClass.FieldN These are the fields in the selected business class of the custom total. For example, GeneralLedgerTotal.

The BusinessClass fields are optional and only required to override the dimension values in the custom total.

Override Value The override value for the business class field. When an override is specified, the location of the values or balances that the custom total references to is replaced by the override address. The address that the custom total references changes when override values are applied in the custom compute statement.

You can override the value of the custom total field in the custom compute statement. The available override values are any fields of the selected business class for the custom compute statement.

Measure A measure in the GeneralLedgerTotal business class.

Example 1, without override

(total(GeneralLedgerTotal.“PROJECTCOSTS").NetFunctionalAmount)

The address in the custom total has these values:

  • Accounting Entity = 3001
  • Accounting Unit = 1011
  • Account = 5000
  • Project = West Park
  • Period = Period 1

The PROJECTCOSTS value is a custom total for the business view GeneralLedgerTotal. The custom compute statement formula will return the NetFunctionalAmount balance of the GeneralLedgerTotal based on the address and period specified in the PROJECTCOSTS custom total.

Example 2, with override

The address that the custom total references changes when override values are applied:

((total(GeneralLedgerTotal.“PROJECTCOSTS",GeneralLedgerTotal.Project=Project,GeneralLedgerTotal.EntityYearPeriod=AllocationContext.Period).NetFunctionalAmount)))

This custom compute statement overrides the project specified in the custom total with the project override currently being referenced by allocations. The period is also overridden to use the allocation run period. The project dimension in the custom total address is replaced by the project override currently being referenced by allocations. The balances for the override address and period are retrieved from the custom total.

This compute statement with the override will return the NetFunctionalAmount for the new address. If the project override being referenced in allocations is "East Park", then the override address will have these values:

  • Accounting Entity = 3001
  • Accounting Unit = 1011
  • Account = 5000
  • Project = East Park
  • Period = Period 2

This custom compute formula will return the NetFunctionalAmount of the override custom total address and period.