Page 1 of 1
Problem calculating cube
Posted: Mon Oct 22, 2012 3:29 pm
by Rosanero4Ever
Hi all,
as I wrote in my past recent post, I created a cube starting from a time dimension and a measure dimension.
i load data from two Sql Server table (Time and Measure)
Each row in time table has multiple references on measure table, so in measure table are multiple rows witch the same date but different values for a particular measure.
But, when I build the cube, in cube viewer, I see only a measure value for each date.
For example:
Date Measure_value
20110101 10
20110101 20
20110101 10
20121013 42
In my cube, I'd like
20110101 40
20121013 42
but I have only a row for each date as following:
20110101 20
20121013 42
I'm sorry for my newbie posts, but I hope someone will help me.
Thanks again for your time
Re: Problem calculating cube
Posted: Mon Oct 22, 2012 3:42 pm
by tomok
You should take some training, read some manuals, whatever, because the question you are asking is just basic OLAP. When you create a simple two-dimensional cube, like the one you described with a time dimension and a measure dimension, you are creating a storage position in the cube for every intersection of time and measure. To say you only have one row for each date is simply not correct. Perhaps you just don't know how to use the Cube Viewer to configure the view so you can see all the intersections.
Re: Problem calculating cube
Posted: Mon Oct 22, 2012 3:55 pm
by Rosanero4Ever
Hi tomok,
I believe you're right. I don't know how to use Cube Viewer, but I know the olap main considerations as reguard as the intersections between two dimensions.
Before TM1 I worked with Framework Manager and Transformer and I never had many problems.
Perhaps, my explanation of the problem is not clear...(I also apologize for my english): for each date I'd like the sum of the measure values occurs in that date. Now, I see only a measure value for each date.
However, I understand where is the problem (I must map missing dimensions!!!). I'll wrote the possible solution later if it works
Thanks very much for all advices you will give me.
Re: Problem calculating cube
Posted: Mon Oct 22, 2012 4:32 pm
by tomok
Rosanero4Ever wrote:for each date I'd like the sum of the measure values occurs in that date.
Well, in order to do that, and encapsulate everything in a single TI process (meaning the creation of the dimensions from scratch, creating the cube from scratch, and loading the data) then you'll have to add some custom code in your TI process because the wizard's not going to be able to do this for you based on your source file. What you need to do is a create a consolidated element in your measure dimension that has both your measures as children. Then the cube will be able to show you each measure, by date, and then a total, by date.
Prolog tab:
Code: Select all
DimensionElementInsert('Misur_Ricavi',,'All_Measures', 'C');
Metadata tab:
Code: Select all
DimensionElementComponentAdd('Misur_Ricavi'', 'All Measures', NameOfVariableInTIProcessThatIsMeasure, 1);
Re: Problem calculating cube
Posted: Tue Oct 23, 2012 1:52 am
by Andy Key
Isn't it just that you aren't accumulating the values during your data load?
Re: Problem calculating cube
Posted: Tue Oct 23, 2012 4:32 am
by winsonlee
Just a matter of preference, if i am loading data directly from SQL server, i would use a query which is compatible with the cube using sum and group by. Not unless if the data is directly from text file which i cant group it, then only i will be accumulating the values.
Not sure about the impact of the performance of which is faster.
Re: Problem calculating cube
Posted: Tue Oct 23, 2012 7:22 am
by Rosanero4Ever
Thanks all for your appreciate advices.
Now, I understand other aspects of TM1 about cube creation and I can create my cube corretly.
Best regards!