same cube with 2 differents dimensions

Post Reply
pobrouwers
Posts: 34
Joined: Mon Aug 11, 2008 7:37 pm
OLAP Product: IBM Cognos TM1
Version: 9.5.2
Excel Version: 2003-2007
Location: France

same cube with 2 differents dimensions

Post by pobrouwers »

hello,

I Have 2 cubes and I have 2 dimension's products :
First dimension for exemple "products" is :
Total
Familly A
SKU1
Familly B
SKU 2

The second dimension for exemple "products_bis" is
Total
Familly A
Familly B

How create a rule to get values for each Familly in the cube2?
In my rules for cube2

Code: Select all

[Volume] = N:DB('cube1',!products_bis','Volume');
This rules doesn't work because I have 2 differents dimension "product" and I use "!"
How do you make ?
Thx in advance

Piet
Mike L
Posts: 58
Joined: Fri Jun 13, 2008 4:01 pm

Re: same cube with 2 differents dimensions

Post by Mike L »

Is the problem just an extra apostrophe?

Code: Select all

[Volume] = N:DB('cube1',!products_bis,'Volume');
User avatar
mattgoff
MVP
Posts: 516
Joined: Fri May 16, 2008 1:37 pm
OLAP Product: TM1
Version: 10.2.2.6
Excel Version: O365
Location: Florida, USA

Re: same cube with 2 differents dimensions

Post by mattgoff »

Bracket notation allows arbitrary element order, but you can specify dimension names. In fact, I've gotten into the habit of explicitly defining the dimension for each element as I've had problems in the past where a rule compiled but was later made ambiguous when I added an element to a dimension. The syntax is:

[dim1:'element1', dim2:'element1'] = N: ...

However, unless I'm misreading your example, you don't have duplicate element names in different dimensions in the same cube, so this ambiguity isn't possible. As Mike said, it looks like you've got some apostrophe issues. Does this work?

['volume'] = N: DB('cube1',!products_bis,'volume');

If not, more info (instead of the hypothetical) would be helpful.

Matt
Please read and follow the Request for Assistance Guidelines. It helps us answer your question and saves everyone a lot of time.
pobrouwers
Posts: 34
Joined: Mon Aug 11, 2008 7:37 pm
OLAP Product: IBM Cognos TM1
Version: 9.5.2
Excel Version: 2003-2007
Location: France

Re: same cube with 2 differents dimensions

Post by pobrouwers »

Hello,

In fact, I had got some apostrophe issues . This is a mistake of my part.
I wanted to say :
['volume'] = N: DB('cube1',!products_bis,'volume'); but it doesn't work !

Because products_bis is not in the cube1.
I believe when we use the expression "!dim", this dim must be present into the 2 cubes. Isn't it ?

How to tell him he must match "products" and "products_bis" on all elements ?

I am sure that this is possible, but unfortunately I don't know the syntax

Thx
David Usherwood
Site Admin
Posts: 1454
Joined: Wed May 28, 2008 9:09 am

Re: same cube with 2 differents dimensions

Post by David Usherwood »

If you want to link cubes with different, but related dimensions, then use the dimension in the cube in which the rule is written. In your case

['volume'] = N: DB('cube1',!products,'volume');

will pull across values where the products dimension matches the products_bis dimension.

BUT....

Watch out for feeders. You can write a similar feeder eg
['Volume'] => DB('cube2',!products_bis,'volume');
and it will compile fine - but feeders _only_ work at N level. If the N level in products_bis match the N level in products, fine. If not (which is common), you need to link the two dimensions, typically via an attribute on products_bis which delivers the matching products. You can also feed to a specific high level destination but that is likely to be a big feeder.

HTH
Mike L
Posts: 58
Joined: Fri Jun 13, 2008 4:01 pm

Re: same cube with 2 differents dimensions

Post by Mike L »

pobrouwers wrote:I believe when we use the expression "!dim", this dim must be present into the 2 cubes. Isn't it ?
How to tell him he must match "products" and "products_bis" on all elements ?
No, it should just work. The values of a !dim variable are the names of the dimension elements. If the rule is in cube2 which uses dimension "products_bis", and if all of the N elements of "products_bis" correspond to identically named elements in the (larger) "products" dimension used by cube1, your syntax should work.

One common mistake: Does the DB() include elements for every dimension of cube1, in the right order?

What is the symptom of not working? Does it fail to compile and save? Does it save but not produce expected results? Any error message?
Mike L
Posts: 58
Joined: Fri Jun 13, 2008 4:01 pm

Re: same cube with 2 differents dimensions

Post by Mike L »

David Usherwood wrote:Watch out for feeders.
Yes, always watch out for feeders. But it is worth noting that when using rules to populate a summary cube, if the summary is not sparse (often, but not always the case) then there is little to be gained from SKIPCHECK so you may be able to dispense with feeding altogether.

(That is, the only thing to be gained is avoiding the suppress-zero bug if for some reason you happen to suppress on a non-sparse cube.)
User avatar
John Hobson
Site Admin
Posts: 330
Joined: Sun May 11, 2008 4:58 pm
OLAP Product: Any
Version: 1.0
Excel Version: 2020
Location: Lytham UK
Contact:

Re: same cube with 2 differents dimensions

Post by John Hobson »

(That is, the only thing to be gained is avoiding the suppress-zero bug if for some reason you happen to suppress on a non-sparse cube.)
And of course the related inaccurate / unpredictable ascii export of calculations in a non-skipchecked / fed cube. (raised yonks ago, but not a big enough problem to have been fixed)
John Hobson
The Planning Factory
pobrouwers
Posts: 34
Joined: Mon Aug 11, 2008 7:37 pm
OLAP Product: IBM Cognos TM1
Version: 9.5.2
Excel Version: 2003-2007
Location: France

Re: same cube with 2 differents dimensions

Post by pobrouwers »

Hello.
Thank you David. It's work.... :D
Post Reply