Consolidates an entity’s data across a range of periods for the specified Scenario and Year dimension members.
You can avoid executing redundant consolidations by calling FindOverlappingConsolidation before launching a consolidation. |
<HsvCalculate>.Consolidate2 lScenario, lYear, lStartPeriod, lEndPeriod, lEntity, lParent, sConsolidationTypeLong (ByVal). The member ID of the Scenario dimension member. | |
Long (ByVal). The member ID of the first Period dimension member in the range of periods to be consolidated. | |
Long (ByVal). The member ID of the last Period dimension member in the range of periods to be consolidated. | |
Long (ByVal). The member ID of the Entity dimension member for which the consolidation is to be run. | |
Long (ByVal). The member ID of the parent entity of the lEntity argument’s entity. | |
Integer (ByVal). Identifies the type of consolidation to be run. Pass one of the HFMConstants type library constants listed in Consolidation Type Constants. |
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