Asking for a customer. Is is possible to apply currency translation on data in the Stage ?

OSAdmin
Valued Contributor
Originally posted by Henri Roest

7/12/2018

Asking for a customer. Is is possible to apply currency translation on data in the Stage ?

1 REPLY 1

OSAdmin
Valued Contributor
Originally 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.

f02db2061b2d1410a2b264a7bc4bcb6a.png

 

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 conversion
 
c8185b83db251c108feee3a84b96195e.png
09185fc3db251c108feee3a84b9619e1.png
 
after
 
e2181b83db251c108feee3a84b961956.png
Staging table and Cube will show the same data now.