Dynamic

Specifies the formula for the dynamic accounts that need calculations. This function can be used in Dynamic rules.

This function can only reference data in the same subcube. If you need to reference data from a different subcube, you may need to create an account to store information from other cubes. For example, to reference a prior year’s data in the formula, you need to use an account to store the last year’s data information so that it can be referenced in the dynamic calculation within the same cube.

Note:

You can embed the HS.View.PeriodNumber function in the Dynamic function. For example:

HS.Dynamic "A#AvgUnits = A#AccumUnits.I#ICP None.C1#None.C2#None / HS.View.PeriodNumber"

Syntax

HS.Dynamic "DestPOV = Expression"

Table 11-19 Syntax for Dynamic Function

Parameter Description

DestPOV

A valid Account member with type set to Dynamic. You may also specify a view for which to execute the calculation.

If you do not specify a view, the formula is executed for Periodic and YTD. To have different formulas for different views, you must specify Periodic or YTD in the formula.

Expression

A calculation expression

Note:

The Dynamic function does not support IF...THEN statements.

Return Value

None.

Example

Sub Dynamic
  HS.Dynamic "A#GM% = A#GM/(A#Sales * 100)/HS.View.PeriodNumber"
End Sub

Expected results for the GM% account:

Custom1 Sales GM GM% (Dynamic Calculation) Calculation based on formula

Product

600

140

23.33%

140 / 160 * 100

P1

100

10

10%

10 / 100 * 100

P2

200

40

20%

40 / 200 * 100

P3

300

90

30%

90 / 300 * 100