Page 1 of 1

Limit rule based on attribute

Posted: Sun Oct 14, 2012 3:30 pm
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 :-)

Re: Limit rule based on attribute

Posted: Sun Oct 14, 2012 7:39 pm
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

Re: Limit rule based on attribute

Posted: Wed Oct 17, 2012 5:45 am
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.