A rules question

Post Reply
mmckimson
Posts: 46
Joined: Fri Jun 15, 2012 1:46 pm
OLAP Product: TM1
Version: 10.1
Excel Version: Office 10

A rules question

Post 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
asutcliffe
Regular Participant
Posts: 164
Joined: Tue May 04, 2010 10:49 am
OLAP Product: Cognos TM1
Version: 9.4.1 - 10.1
Excel Version: 2003 and 2007

Re: A rules question

Post 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.
mmckimson
Posts: 46
Joined: Fri Jun 15, 2012 1:46 pm
OLAP Product: TM1
Version: 10.1
Excel Version: Office 10

Re: A rules question

Post by mmckimson »

It does... here are the dimensions of both cubes:

Image

As you can see, the other dimensions are identical.

Mike
User avatar
wissew
Posts: 54
Joined: Tue Jun 17, 2008 7:24 pm
OLAP Product: TM1
Version: 9.5.2; 10.2.2; 11
Excel Version: 2003 SP3 - 2013
Location: Beaverton, OR

Re: A rules question

Post 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
Post Reply