Summarising numbers in an output cube

Post Reply
fourfive
Posts: 5
Joined: Tue Aug 21, 2012 1:16 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007
Location: UK

Summarising numbers in an output cube

Post by fourfive »

I'm very new to TM1 but have done the IBM 5 day training, but obviously wasn't concentrating enough. :?:

I have a cube called Sales_Margins dimensioned by Months, Countries, Versions, Products and a measure called Sales_Margins. One item in the Sales_Margins dimension is called Volume.
I want to pass data the volumes data into another cube called BuyerVolumes that is a dimensioned by Months, Versions(as in the Sales_Margins cube) and Buyers.

I have created an attribute on Products dimension called Buyer and populated it with the buyers names (eg products A,B,C belong to Jim, D,E,F belong to Bob etc)

My Rule in BuyerVolumes looks like;

[]=N:DB('Sales_Margins','COUNTRIES TOTAL',ATTRS('Products',!Products,'Buyer'),!Months,!Versions),'Volume');

I get a syntax error around the Products bit. :?: :?:

I know I could have the buyers in the products dimension as a hierarchy but that would be too easy.
Catherine
Posts: 110
Joined: Wed May 20, 2009 7:30 am
OLAP Product: TM1
Version: 10.2.2 - PA
Excel Version: 2010
Location: Rennes, France

Re: Summarising numbers in an output cube

Post by Catherine »

I get a syntax error around the Products bit.
This is logic, you write your rule in the BuyerVolumes cube, which does not contain the Products dimension, so he does not understand !Products
I know I could have the buyers in the products dimension as a hierarchy but that would be too easy.
You've got it, that's the solution !
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Summarising numbers in an output cube

Post by tomok »

fourfive wrote:I know I could have the buyers in the products dimension as a hierarchy but that would be too easy.
Given what you want to do it is really your only option. Your rule would then be:

[]=N:DB('Sales_Margins','COUNTRIES TOTAL',!Buyer,!Months,!Versions,'Volume');

Make sure the names of the buyers in the Product hierarchy are spelled the same as the elements in the Buyers dimension or it won't work.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
JDLove
Posts: 49
Joined: Thu May 21, 2009 1:16 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: Summarising numbers in an output cube

Post by JDLove »

The rule is incorrect as there is no !Product in the cube you are writing the rule.....

I was once given this advise and its served me well, generally best to keep the data in as much detail as possible then its easy to aggregate later, in this example you would be best to have the buyer as a dimension in in the sales margins cube, this allows for 1 to many and changes in buyer product relationships.
I wouldn't mix/include it as part of the hierarchy for the reasons mentioned, best to keep dimensions clean.
fourfive
Posts: 5
Joined: Tue Aug 21, 2012 1:16 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007
Location: UK

Re: Summarising numbers in an output cube

Post by fourfive »

Thankyou all for informed and quick replies, as an aside and probably talking in ignorance could the first question be done with TI ?
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: Summarising numbers in an output cube

Post by asutcliffe »

fourfive wrote:Thankyou all for informed and quick replies, as an aside and probably talking in ignorance could the first question be done with TI ?
Yeah, pretty much, of course updates won't be real time like they would with a rule. You could use a view of the "Sales_Margins" cube as a data source and for each record, look up the value of the "Buyer" attribute for element of the "Product" dimension. Of course depending on how the data got into "Sales_Margins" in the first place, you might want to populate "BuyerVolumes" from that source.
JDLove wrote:I wouldn't mix/include it as part of the hierarchy for the reasons mentioned, best to keep dimensions clean.
Personally, I don't worry too much about this. I find as long as meaningful consolidation names are used (perhaps with a prefix or similar) and the subsets used in reports etc are well thought out, it doesn't cause too much grief. There will be times when this approach is the way to go.
Post Reply