[SOLVED] Best Practice for currencies calculations???
Hello,
i have a table with sales figures for the last four business years. In this table i have three currencies EUR, USD and BPD. I also have a table with the average exchange rates of the fiscal years. What is the best way to calculate the currencies to EURO. Is it an option to calculate them direct on the master file of the sales figures table with a huge if then else story.
Regards
ChristianThis message has been edited. Last edited by: ChristianP,
WF Production Version: 7.7.02M WF Test Version: 7.7.02M Developer Studio: 7.7.02 HTML, EXL2K, FLEX, PDF,PPT
November 07, 2011, 09:58 AM
Håkan
Christian
I would refrain from coding this in the Master file. Rather have a separate table which can generate a textfile with the currency and, year and rate, e.g.
EUR2008 9.00 USD2009 6.85 GBP2010 10.50
APP PREPENDPATH test APP FI xrates DISK test/xrates.txt DEFINE FILE CAR currency_year/A7 = DECODE COUNTRY( 'ENGLAND' 'EUR2008' 'FRANCE' 'USD2009' ELSE 'GBP2010' ); END TABLE FILE CAR SUM DEALER_COST COMPUTE eur_value = DECODE currency_year(xrates); COMPUTE eur_dealer_cost = DEALER_COST * eur_value; BY COUNTRY END