Page 1 of 1

Cube multiplication and factoring.

Posted: Tue Jan 21, 2014 2:58 pm
by Plunge pool
I am not sure whether this can be done nor what is the best approach to do this, so maybe someone can shed some light here.

-I have a cube that contains the following: Start date, Province, company, widget#
This cube is wehere company information resides

-I have a second cube that contains the following: Week (elements are Wk1-Wk52), Province, Factor Production #
This cube outlines production factors by week . Ex. Week 1 in Ontario produces 2 widgets, Week 2 in Ontario produces 3 widgets...etc.

I want to have a third cube to summarize all the info together of all the production.

So let's say I have company A which starts in the third week of January and he resides in Ontario. Company A's production in JAN03 is 2, and JAN04 is 3 and so on for the next 52 weeks.
If I had company B which starts in the fourth week of January and he resides in Ontario, Company B's production in JAN04 is 2 and JAN05 is 3 and so on for the next 52 weeks.

But the summary has to aggregate everything. So in Ontario you have JAN03 = 2, JAN04=5, and JAN05= 3 + whatever company A's production is supposed to be...etc.

I have no idea how to even ask the concept on google? multiple factor cube, aggregate summary cubes? Dunno.

Hope you guys can help

Thanks!

Re: Cube multiplication and factoring.

Posted: Tue Jan 21, 2014 5:29 pm
by tomok
This is pretty much Multi-dimensional Modelling 101 here. You decide along what axes you want to summarize by and make them dimensions where each of them have a top-level parent that sums all the children. From the looks of things, the third cube would have Company, Week, Province (or maybe this could be a parent of company????), Widget#, and Measure.

Re: Cube multiplication and factoring.

Posted: Tue Jan 21, 2014 8:29 pm
by Plunge pool
tomok wrote:This is pretty much Multi-dimensional Modelling 101 here. You decide along what axes you want to summarize by and make them dimensions where each of them have a top-level parent that sums all the children. From the looks of things, the third cube would have Company, Week, Province (or maybe this could be a parent of company????), Widget#, and Measure.

Thanks for input but that's not what I am asking.

I want to actually multiply the first cube by the second cube and get a result to aggregate.

Re: Cube multiplication and factoring.

Posted: Tue Jan 21, 2014 8:58 pm
by tomok
Plunge pool wrote:Thanks for input but that's not what I am asking.

I want to actually multiply the first cube by the second cube and get a result to aggregate.
Well, actually, that is what you are asking. In order for the calculations to aggregate, you have to have the proper dimensionality in a cube to do the aggregation. In this case you would have to either 1) build a third cube with this dimensionality and write the intercube rule to perform the calculation and place the result in this cube or 2) modify the second cube to have the proper dimensionality and write the rule. What part of this do you not understand?

If you want further help I suggest you post the complete specifics of each cube, including complete dimensionality, not pseudo code and/or names, so we can see exactly what are expecting TM1 to do for you.

Re: Cube multiplication and factoring.

Posted: Wed Jan 22, 2014 3:37 pm
by Plunge pool
tomok wrote:
Plunge pool wrote:Thanks for input but that's not what I am asking.

I want to actually multiply the first cube by the second cube and get a result to aggregate.
Well, actually, that is what you are asking. In order for the calculations to aggregate, you have to have the proper dimensionality in a cube to do the aggregation. In this case you would have to either 1) build a third cube with this dimensionality and write the intercube rule to perform the calculation and place the result in this cube or 2) modify the second cube to have the proper dimensionality and write the rule. What part of this do you not understand?

If you want further help I suggest you post the complete specifics of each cube, including complete dimensionality, not pseudo code and/or names, so we can see exactly what are expecting TM1 to do for you.
Ok here's my attempt to do it. I'll simplify the cubes a lot, but in reality it will be MUCH bigger, so keep that in mind

Cube1 Data entry:
-Dim Provinces: Ontario,Quebec Elements
-Dim Week: Time dimension
-Dim Company: Ford, Mazda Elements.
-Measures:
*Ford Startdate Attribute: 201304, Car parts measure 50
*Mazda Startdate Attribute: 201305, Car parts measure 100

What this cube is allowing users to enter is the production starting on a specific week. So Ford produces 50 car parts starting week of 201304, and will continue since then....

Cube 2 Production Schedule

-Dim Provinces: Ontario,Quebec Elements
-Dim ProdWeek: 1,2 Elements
-Dim Company: Ford, Mazda Elements.
-Dim Parts: Mufflers, Brakes Elements
-Measures: Ontario,1, Ford, Mufflers, 1 ......Ontario,2, Ford, Mufflers, 2.......Quebec,1, Mazda, Mufflers, 3....Quebec,2, Mazda, Mufflers, 4

Cube 3: Summary Cube


-Dim Provinces: Ontario,Quebec Elements
-Dim Week: Time dimension
-Dim Company: Ford, Mazda Elements.
-Dim Parts: Mufflers, Brakes Elements
MEasures. Ontario,201304, Ford, Mufflers, 50 ......Ontario,201305, Ford, Mufflers, 100.......Quebec,201305, Mazda, Mufflers, 300....Quebec,201306, Mazda, Mufflers, 400

This cube would consolidate for 2013
-Ontario,2013, Ford, Mufflers, 150
-Quebec,2013, Mazda, Mufflers, 700

Hope this clears it up....let me know fi I can clarify more...