ATTRS in DB?

Post Reply
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

ATTRS in DB?

Post by Kazêh »

hi, im new on tm1 and i have a doubt about if is it posible to have attrs under DB function like:

[]= S: if((DB(!dimension1,!dimension2,attrs('dimension3', !dimension3, 'Atribute'), !dimension4);

is it posible?

Thanks
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: ATTRS in DB?

Post by declanr »

Kazêh wrote:hi, im new on tm1 and i have a doubt about if is it posible to have attrs under DB function like:

[]= S: if((DB(!dimension1,!dimension2,attrs('dimension3', !dimension3, 'Atribute'), !dimension4);

is it posible?

Thanks
Kazêh,

It's perfectly possible to incorporate an ATTRS function within a DB and is in fact very common practice, you can include pretty much any function within any other function as long as it makes sense to do so (e.g. check that the output of the incorporated function is string if the requirement is for the parameter of the exterior function to be string)

Your best bet when looking at this sort of concept is to simply set up some basic dummy models (possibly one of the pre-packaged IBM ones) and just add the rule and see what happens,

Your above rule would obviously need a result to the IF statement and a cube reference e.g.

Code: Select all

['Measure']= S: If( DB('Cube', !dimension1,!dimension2, attrs('dimension3', !dimension3, 'Atribute'), !dimension4) = 1, 'True', 'False' );
Declan Rodger
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: ATTRS in DB?

Post by Kazêh »

thanks for the quick aswer, i will try it out :D
Post Reply