currency conversion in EPCM
Summary:
I’m using the following currency conversion rule to calculate data in AUD_Reporting for Input, Allocation In, and Allocation Out data. However, it takes too long to process, forcing me to terminate it manually:
AUD_Reporting:= ([AUD], [PCM_Rule]) + ([GBP], [PCM_Rule]) * ([GBP], [PCM_NoRule], [PCM_Input], [No Entity], [No Product], [No Project], [FX Rates Average], [No Cost Centre]) + ([USD], [PCM_Rule]) * ([USD], [PCM_NoRule], [PCM_Input], [No Entity], [No Product], [No Project], [FX Rates Average], [No Cost Centre]);
To optimize it, I used NONEMPTYTUPLES, which significantly improved performance, completing the calculation in seconds:
AUD_Reporting:= NONEMPTYTUPLE ([AUD], [PCM_Rule]) ([AUD], [PCM_Rule]) + ([GBP], [PCM_Rule]) * ([GBP], [PCM_NoRule], [PCM_Input], [No Entity], [No Product], [No Project], [FX Rates Average], [No Cost Centre]) + ([USD], [PCM_Rule]) * ([USD], [PCM_NoRule], [PCM_Input], [No Entity], [No Product], [No Project], [FX Rates Average], [No Cost Centre]);