IF statement in a rule
Posted: Thu Sep 10, 2015 9:12 am
Hi all.
We have a rule in one of our cubes that converts our local currency data into AUD and AUDYE based on some exchange rates in another cube as shown below.
As you can probably tell this rule sets it to do it automatically for all of the elements in the “Company” dimension.
I would like to amend this rule so that it does it automatically for all elements in the "Company" dimension except for one called "PTLCON". I assume it just needs some sort of IF then or CASE type expression but I haven't been able to figure it out.
Any help would be appreciated.
The existing rule is
Skipcheck;
#translate local to AUD and AUDYE by multiplying by the exchange rate for each country. Currency stored in attribute of company
['AUD'] = n: ['Local'] * DB('Exchange Rates', !Year, 'Average Rate', db('}ElementAttributes_Company',!Company,'Currency'), !Version, !Month);
['AUDYE'] = n: ['Local'] * DB('Exchange Rates', !Year, 'Yearly Average Rate', db('}ElementAttributes_Company',!Company,'Currency'), !Version, !Month);
Feeders;
['local']=>['AUD'];
['local']=>['AUDYE'];
Regards
David
We have a rule in one of our cubes that converts our local currency data into AUD and AUDYE based on some exchange rates in another cube as shown below.
As you can probably tell this rule sets it to do it automatically for all of the elements in the “Company” dimension.
I would like to amend this rule so that it does it automatically for all elements in the "Company" dimension except for one called "PTLCON". I assume it just needs some sort of IF then or CASE type expression but I haven't been able to figure it out.
Any help would be appreciated.
The existing rule is
Skipcheck;
#translate local to AUD and AUDYE by multiplying by the exchange rate for each country. Currency stored in attribute of company
['AUD'] = n: ['Local'] * DB('Exchange Rates', !Year, 'Average Rate', db('}ElementAttributes_Company',!Company,'Currency'), !Version, !Month);
['AUDYE'] = n: ['Local'] * DB('Exchange Rates', !Year, 'Yearly Average Rate', db('}ElementAttributes_Company',!Company,'Currency'), !Version, !Month);
Feeders;
['local']=>['AUD'];
['local']=>['AUDYE'];
Regards
David