Page 1 of 1

A rules question

Posted: Fri Jul 06, 2012 3:44 pm
by mmckimson
One final newbie question for the day!

To build my knowledge I have built two cubes with identical dimensions (dimTime, Quantity) and 2 different dimensions (dimCostCentertest, dimCostCenterFinal) that have identical elements. I'm trying to move data from RuleTest1 (with CostCenter1 dimension) to RuleTest2. I tried the following:

Code: Select all

['Quantity'] = n: DB('RuleTest1', !Quantity, !dimCostCentertest , !dimTime);
As an FYI, Quantity only has one element (Quantity) in it for testing purposes.

This rule throws the following error:

Image

My understanding is that TM1 should be able to match up elements in different dimensions, but I'm obviously doing something wrong. Any assistance would be appreciated.

Mike

Re: A rules question

Posted: Fri Jul 06, 2012 3:58 pm
by asutcliffe
What you're trying to do should work (if I've understood you correctly). Does the cube you're trying to save this rule for have a dimension called dimCostCentertest? That error suggests to me that it doesn't.

Re: A rules question

Posted: Fri Jul 06, 2012 4:26 pm
by mmckimson
It does... here are the dimensions of both cubes:

Image

As you can see, the other dimensions are identical.

Mike

Re: A rules question

Posted: Fri Jul 06, 2012 6:39 pm
by wissew
mmckimson wrote:It does... here are the dimensions of both cubes:

Image

As you can see, the other dimensions are identical.

Mike

Mike,
Within the DB section you need to use the dimension names that are in the target cube.
['Quantity'] = n: DB('RuleTest1', !Quantity, !dimCostCenterFinal , !dimTime);

The rule can only reference what it know about the cube it is attached to. The cube rule only knows the elements in the dimCostCenterFinal dimension because they are part of the RuleTest2 cube. By using the dimension name associated with the cube the rule is attached to you are able to match the elements. To put this in relational DB terms, where ever there is a match in the test1 cube TM1 will create a join. Applying this to the feeder needed in RuleTest1 the restult is below:

['Quantity'] => DB('RuleTest2', !Quantity, !dimCostCentertest , !dimTime);

Good Luck