Consolidate

Consolidates an entity’s data for the specified Scenario, Year, and Period dimension members.

Tip:

You can avoid executing redundant consolidations by calling FindOverlappingConsolidation before launching a consolidation.

Syntax

<HsvCalculate>.Consolidate lScenario, lYear, lPeriod, lEntity, lParent, sConsolidationType

Argument

Description

lScenario

Long (ByVal). The member ID of the Scenario dimension member.

lYear

Long (ByVal). The member ID of the Year dimension member.

lPeriod

Long (ByVal). The member ID of the Period dimension member.

lEntity

Long (ByVal). The member ID of the Entity dimension member for which the consolidation is to be run.

lParent

Long (ByVal). The member ID of the parent entity of the lEntity argument’s entity.

sConsolidationType

Integer (ByVal). Identifies the type of consolidation to be run. Pass one of the HFMConstants type library constants listed in Consolidation Type Constants.

Example

This example runs consolidation for the dimension members passed to the user-defined GetMemberID function, which returns their member IDs. (For information on GetMemberID, see the example for GetItemID.) These member IDs are then passed to Consolidate.

Dim lScen As Long, lYear As Long, lPer As Long
Dim lEnt As Long, lPar As Long
Dim cCalculate As HsvCalculate
lScen = GetMemberID(DIMENSIONSCENARIO, "Actual")
lYear = GetMemberID(DIMENSIONYEAR, "2000")
lPer = GetMemberID(DIMENSIONPERIOD, "July")
lEnt = GetMemberID(DIMENSIONENTITY, "UnitedStates")
lPar = GetMemberID(DIMENSIONENTITY, "Regional")
Set cCalculate = m_cHsvSession.Calculate
cCalculate.Consolidate lScen, lYear, lPer, lEnt, lPar, _ 
CONSOLIDATE_ALL