Translates an entity’s data from one currency to another across a range of periods for the specified Scenario, Year, and Value dimension members.
Translate2 uses the default exchange rates defined for an application. If an application has a translation rule, Translate2 executes the rule instead of applying the default exchange rates. |
<HsvCalculate>.Translate2 lScenario, lYear, lStartPeriod, lEndPeriod, lEntity, lParent, lValue, varbForceTranslate
This example translates the Italy entity’s amount to the USD currency. The dimension members’ labels are 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 Translate2.
Dim lScen As Long, lYear As Long, lStartPer As Long
Dim lEndPer As Long, lEnt As Long, lPar As Long, lVal As Long
Dim cCalculate As HsvCalculate
lScen = GetMemberID(DIMENSIONSCENARIO, "Actual")
lYear = GetMemberID(DIMENSIONYEAR, "2000")
lStartPer = GetMemberID(DIMENSIONPERIOD, "July")
lEndPer = GetMemberID(DIMENSIONPERIOD, "September")
lEnt = GetMemberID(DIMENSIONENTITY, "Italy")
lPar = GetMemberID(DIMENSIONENTITY, "Europe")
lVal = GetMemberID(DIMENSIONVALUE, "USD")
Set cCalculate = m_cHsvSession.Calculate
cCalculate.Translate2 lScen, lYear, lStartPer, lEndPer, lEnt, _
lPar, lVal, False