AX2663
Example data conversion
The following screenshot shows an example of data being converted using a GetData function. In this example, there are two GetData functions, one returning the "base" non-converted data, and one returning the converted data. The functions are exactly the same except that the second function is using an optional parameter to specify a conversion target.
The base data is $152,811,182 and the converted data is £107,120,639. The following explains how this converted value was obtained:
-
Axiom Software checks that the specified table is configured for conversions, and checks that the specified column (M1) is part of the mapped sequence for that conversion.
-
Axiom Software determines the keys for the conversion (From, To, Type, Scenario). The specific key combination will determine which row to use in the conversion table.
-
The "To" is determined from the GetData function, from the ConversionTarget parameter ("GBP"). (If this were an Axiom query instead of a GetData function, then the target is specified in the Axiom query settings on the Control Sheet.)
-
The "From" is determined from the conversion settings. In this case the "from" value is specified as a fixed value, "USD". If a column had been specified instead, the value would have been looked up from that column.
-
The "Type" is determined from the conversion settings. In this case the "type" value is specified as a fixed value, "AVG". If a column had been specified instead, the value would have been looked up from that column.
-
The "Scenario" is determined from the conversion settings ("Actual").
Therefore the keys for this conversion are USD, GBP, AVG, Actual.
-
-
Axiom Software identifies the record in the conversion table that holds the conversion rate, using the conversion keys.
-
Axiom Software uses the sequence map in the conversion configuration to determine which rate to use. The GetData function queries column M1 of the target table, which is the first column of the M sequence. This sequence is mapped to the sequence MonthlyConversionRates in the CurrencyConversion table, so the conversion rate is taken from the first column of that sequence, M1.
-
Axiom Software performs the math on the data table to arrive at the converted value: 152,811,182 x .701 = 107,120,639.