Using ATTRS function for two attributes

Post Reply
hpansar
Posts: 17
Joined: Fri Apr 19, 2013 6:50 pm
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: 2013

Using ATTRS function for two attributes

Post by hpansar »

Hello Everyone,

I am building a RULE that I need to pull two attributes from one dimension. Essentially I am trying to obtain the sales for IO Fast Moving in a Product hierarchy that has Parts as one of the attribute members (belongs to Category attribute) and Fast Moving attribute member (belongs to Discount Sales Type attribute).

My code is below, but can you actually write an ATTRS within another ATTRS?

['Original' , 'Planning Division' , 'IO Fast moving'] = N: DB('PACMonthlyMargin', !View, !Version, !ManagementEntity, !Channel, !Currency, !Region, !ProductLine, 'IO', !PACProductCategory , 'Gross Sales excl Warranty and Returns', !MonthYearFiscal, 'Value');

thanks

Hiten
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Using ATTRS function for two attributes

Post by declanr »

Hiten,

Sorry I don't think I quite followed the question there.

Are you simply asking if you can nest ATTRS functions within a rule, if so the answer is yes and you can nest pretty much anything in TM1 (as long as its logical... on an aside there is a limit of 20 nested IFs within a TI - fun fact for the day... or at least there were in 9.5.2)

Below is an example of a nested ATTRS function

Code: Select all

ATTRS ( 'd_regions', ATTRS ( 'd_products', !d_products, 'region' ), 'budget owner' )
HTH
Declan Rodger
hpansar
Posts: 17
Joined: Fri Apr 19, 2013 6:50 pm
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: 2013

Re: Using ATTRS function for two attributes

Post by hpansar »

yes nested ATTRS, thanks, this is what I needed
Post Reply