Custom Translation for FX Scenario - Help
Hello, I am trying to create a FX Scenario - Acutuals at Prior Year Rate. I know i can use Constant Year For FX Rate and assign the year from which OneStream will pick Actuals rate in this case. But i dont want the user to be changing this property every year.
My approach is to set "Translation Algorithm Type" to "Standard Using Business Rules For FX Rates" and create a custom translation for that specific scenario "Actuals at Prior Year Rate".
Does anyone has the logic to translate the scenario using Actual Exchange rate tables switching one year back from the POV being translated?
In your case, all you need may just be this (have not tested it) in a Finance BR attached to the cube. Provided that you add some limitations to ensure this executes for the correct scenario only and still execute the default translation for your standard scenarios.
Dim BudScenarioId As Integer = api.Members.GetMemberId(dimTypeId.Scenario, "BUD") Dim priorTimeId As Integer = api.Time.GetPriorYearPeriodId(api.Pov.Time.MemberPk.MemberId) Dim RateTypeCloBudPre As FxRateType = api.FxRates.GetFxRateTypeForAssetLiability(,BudScenarioId) Dim cloRateBudPre As Decimal = api.FxRates.GetCalculatedFxRate(RateTypeCloBudPre,priorTimeId) Dim RateTypeAvgBudPre As FxRateType = api.FxRates.GetFxRateTypeForRevenueExp(,BudScenarioId) Dim avgRateBudPre As Decimal = api.FxRates.GetCalculatedFxRate(RateTypeAvgBudPre,priorTimeId) api.ExecuteDefaultTranslation(FxRuleType.Direct, avgRateBudPre, FxRuleType.Direct, cloRateBudPre)
(Using S#BUD and prior year period as an example source for the FX rate)