Page 1 of 1

Using ATTRS function for two attributes

Posted: Tue May 07, 2013 8:50 pm
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

Re: Using ATTRS function for two attributes

Posted: Tue May 07, 2013 9:04 pm
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

Re: Using ATTRS function for two attributes

Posted: Tue May 07, 2013 9:24 pm
by hpansar
yes nested ATTRS, thanks, this is what I needed