IF statement in a rule

Post Reply
davidh
Posts: 11
Joined: Thu Nov 29, 2012 2:19 am
OLAP Product: TM1
Version: 10.2.1.1 IF2
Excel Version: 2013

IF statement in a rule

Post by davidh »

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
babytiger
Posts: 78
Joined: Wed Jul 31, 2013 4:32 am
OLAP Product: Cognos TM1, EP, Analyst
Version: 10.2.2
Excel Version: 2013
Location: Sydney AU

Re: IF statement in a rule

Post by babytiger »

I think you can archive this in various ways. Depending what you want to do with that PTLCON company.

Without knowing what you want to do with PTLCON, here is what I would recommend, you can add the following rule on top of your other 2 rules (and may be replace stet with whatever rule you want to apply.

Code: Select all

[{'AUD','AUDYE'},'Company':'PTLCON']= n: stet;
MK
davidh
Posts: 11
Joined: Thu Nov 29, 2012 2:19 am
OLAP Product: TM1
Version: 10.2.1.1 IF2
Excel Version: 2013

Re: IF statement in a rule

Post by davidh »

Thanks babytiger.

I don't need to do anything with PTLCON so the 'stet' function works a treat.

Thanks.
Post Reply