Attribute Cube Rules

Post Reply
User avatar
Eric
MVP
Posts: 373
Joined: Wed May 14, 2008 1:21 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003
Location: Chicago, IL USA

Attribute Cube Rules

Post by Eric » Fri May 16, 2008 8:13 pm

Once again I think I am asking a easy question for you guys, but the syntax is messing with me.

I have the following Rule
['FAMILY'] = S:ELPAR('Codes',!Codes,1);

However, I only want it to calculate for the leaf level. So I tried
['FAMILY'] = S:N:ELPAR('Codes',!Codes,1);

It did not work. Am I doing something wrong? I am guessing I can combind IF & ELPARN but I was hoping for something easier to read (C: & N:).

Kind of like
IF( ELPARN(ELPAR('Codes',!Codes))=0, S:ELPAR('Codes',!Codes,1);
ElseIf (ELPARN(ELPAR('Codes',!Codes))>0,'somthing');

Any thoughts?
Regards,
Eric
Blog: http://tm1-tipz.blogspot.com
Articles: http://www.google.com/reader/shared/use ... /label/TM1


Production: 32 bit 9.0 SP2, Windows 2000 Advanced Server. Web: 32 bit 9.0 SP2, Windows 2000 Server. Excel 2003

User avatar
Mike Cowie
Site Admin
Posts: 438
Joined: Sun May 11, 2008 7:07 pm
OLAP Product: TM1, MSAS
Version: Anything thru 11.x
Excel Version: 2003 - 2016
Location: Alabama, USA
Contact:

Re: Attribute Cube Rules

Post by Mike Cowie » Fri May 16, 2008 8:21 pm

Eric,

As you've seen (S:)tring and (N:)umeric don't mix in the same rule. Have you looked at the ISLEAF function?

Code: Select all

['FAMILY'] = S: IF(ISLEAF() = 1, ELPAR('Codes',!Codes,1), STET);
At the lowest level this rule will calc the ELPAR and above that you'll be able to in put values (STET = let it stand/no rule calc). I think ISLEAF has been around for a little while now and I use it most often writing drill-through rules.

Regards,

User avatar
Eric
MVP
Posts: 373
Joined: Wed May 14, 2008 1:21 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003
Location: Chicago, IL USA

Re: Attribute Cube Rules

Post by Eric » Fri May 16, 2008 8:36 pm

Yep I just found that I ended up doing

FEEDSTRINGS;
SKIPCHECK;

['FAMILY'] = S: IF( (ISLEAF = 1)
, ELPAR('Codes',!Codes,1)
, !Codes
);

FEEDERS;
[]=>['FAMILY'];


Thanks!
Regards,
Eric
Blog: http://tm1-tipz.blogspot.com
Articles: http://www.google.com/reader/shared/use ... /label/TM1


Production: 32 bit 9.0 SP2, Windows 2000 Advanced Server. Web: 32 bit 9.0 SP2, Windows 2000 Server. Excel 2003

Post Reply