Forum Discussion
- OSAdminValued ContributorOriginally posted by Celvin Kattookaran
I had to do this for my client.I'm using the FX rates stored in the cube and converting them to local currency.
I've a currency column in my plan table.
Dim entity As String = args.Line.Split(",")(4).Trim()
Dim currency As String = args.Line.Split(",")(7).Trim()
Dim entityID As Integer = BRApi.Finance.Members.GetMemberId(si, DimTypeId.Entity, entity)
Dim locCurrency As String = BRApi.Finance.Entity.GetLocalCurrency(si,entityID).Name
Dim wfTimeName As String = BRApi.Finance.Time.GetNameFromId(si,si.WorkflowClusterPk.TimeKey)
Dim fxRatePkUsingNames As New FxRatePkUsingNames("AverageRate", wfTimeName, currency, locCurrency)
If currency.XFEqualsIgnoreCase(locCurrency) Then
Return args.Value
Else
Return args.Value/BRApi.Finance.Data.GetStoredFxRate(si,fxRatePkUsingNames).Amount
End If
Value before conversionafterStaging table and Cube will show the same data now.