Limit rule based on attribute

Post Reply
mitch23
Posts: 21
Joined: Thu Jan 29, 2009 11:32 am
OLAP Product: Planning Analytics
Version: 10.1
Excel Version: Office 365

Limit rule based on attribute

Post by mitch23 »

I have a pretty simple G/L cube with the dimensions Entity, Account, Job, Period, Version, Measure. Each element of the Job dimension "belongs" to an element of the Entity dimension and that relationship is specififed via an "Entity" attribute of the Job. I want to write a rule and have that rule apply only if the Job "belong" to the Entity being evaluated. Something like:

['(area definition)'] = N:IF(ATTRS('Job', !Job, 'Entity')@=!Entity, [value if true], CONTINUE);

This syntax is not valid of course but it illustrates what I'm trying to accomplish. Any suggestion would be greatly appreciated. I'm sure I'm goikng to feel stupid when someone shows me the obvious solution :-)
Wim Gielis
MVP
Posts: 3128
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Limit rule based on attribute

Post by Wim Gielis »

This syntax is correct! At least, on a Sunday evening I don't see anything wrong in the rule.

Obviously, you need to:

- provide a valid area on the left
- have the same kind of values in the Entity elements and attribute values for Entity
- specify [value if true] correctly

Also, I'd route the False part to 0 rather than CONTINUE, unless you have a special plan for this slice of the cube.

Wim
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Andy Key
MVP
Posts: 351
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: Limit rule based on attribute

Post by Andy Key »

Try switching

ATTRS('Job', !Job, 'Entity')@=!Entity

to

!Entity@=ATTRS('Job', !Job, 'Entity')

I'm sure I've had issues in the past with the former, and fixed it with the latter.
Andy Key
Post Reply