Page 1 of 1

Syntax for Area in Rule

Posted: Tue Jul 08, 2008 5:09 pm
by mbeckw
I need to write a rule to apply an excahge rate. I was wondering how to write the area to include the elements of a consolidation without having to include all elements. Below is the syntax I am currently using. I would like to shorten it if possible.

['5080','5090','5091','5093','US$','Actual'] = N:IF(numbr(!Financial Accounts)>290000,(DB('Financials', !CoCost, !Financial Accounts, !Version, !Departments, !Month, 'CD$')/DB('Exchange Rate','CDA AVERAGE EXCHANGE RATE',!Month)),0);

There are many more costcenters than what is shown above. I want to include all elements of
"C0 50 Canada" without having to input them all into the area of the rule. Is there a way to do this?

Thank you,

Mark

Re: Syntax for Area in Rule

Posted: Tue Jul 08, 2008 5:14 pm
by Martin Ryan
The answer is in "elisanc" i.e. elisanc('Dimension', !Elem, 'Consolidation')"

['US$','Actual'] = N:IF(elisanc('CoCost', !CoCost, 'C0 50 Canada'),(DB('Financials', !CoCost, !Financial Accounts, !Version, !Departments, !Month, 'CD$')/DB('Exchange Rate','CDA AVERAGE EXCHANGE RATE',!Month)),continue);

HTH,
Martin

Re: Syntax for Area in Rule

Posted: Tue Jul 08, 2008 5:18 pm
by mbeckw
Thanks. I will try that. How about having the exchange rate only calculte for the month and then the consolidated element will ne the sum of the months for a YTD?

Thanks again,

Mark

Re: Syntax for Area in Rule

Posted: Tue Jul 08, 2008 5:26 pm
by Martin Ryan
That will happen automatically because your rule says "N:" this means the rule is only applied at the leaf (N) level, and that consolidations will still be consolidations.

To make the rule apply to everything, N and C level regardless, remove the "N:".

To make a rule apply only to C level, make the N: a C:

Martin

Re: Syntax for Area in Rule

Posted: Tue Jul 08, 2008 5:27 pm
by mbeckw
That is what I was hoping would happen so I will just leave in the N:. Thanks again for the help.

Re: Syntax for Area in Rule

Posted: Tue Jul 08, 2008 6:17 pm
by Eric
['5080','5090','5091','5093','US$','Actual']
Try
[{'5080','5090','5091','5093'},'US$','Actual']