Consolidate2

Consolidates an entity’s data across a range of periods for the specified Scenario and Year dimension members.

Tip:

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

Syntax

<HsvCalculate>.Consolidate2 lScenario, lYear, lStartPeriod, lEndPeriod, 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.

lStartPeriod

Long (ByVal). The member ID of the first Period dimension member in the range of periods to be consolidated.

lEndPeriod

Long (ByVal). The member ID of the last Period dimension member in the range of periods to be consolidated.

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 Consolidate2.

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