Page 1 of 1

sum of two cubes through TI

Posted: Tue Jul 03, 2012 11:00 am
by viswaraju
I have two cubes with dimensions

Cube1 Cube2
CC CC
Proj Scenario
Scenario Year
Year Months
Months Measures
Measures

I want sum cube 2 values with cube 1 values(All values)
I have tried with TI by selecting the cube1 view as source updating the Cube 2 by ignoring Proj dim.
It updated values.
How to sum this values like in cube 1 i have cell intersection of all dimensions with 10,20,30..
In cube 2 I have for cell intersection of all dimensions with 20,30,40....
When i sum this two cubes the intersection of all cell values should be 30,50,70...
please find the attachment for the script I have tried, it was giving error like Wrong dimensions,because there is no Proj Dimensions in it.

Thanks and regards
TM1 9.5.2
Excel 2007

Re: sum of two cubes through TI

Posted: Tue Jul 03, 2012 12:03 pm
by Wim Gielis
In the CellPutN() statement, do not use a reference to the Projects dimension - since you do not have it in the other cube.
Load in a cumulative way using CellGetN, incrementing the value and CellPutN to write to cube 2.

If you were on TM1 v10, which you are not, then the function CellIncrementN could do this in 1 step instead of 3.

Re: sum of two cubes through TI

Posted: Tue Jul 03, 2012 12:09 pm
by viswaraju
thank you Wim Gielis,

I have tried with Accumulate values in Data Action in Maps TAB,but here when ever I run TI process it summing up every based on values present in the cube.

But I want Only one time adding the values, please can you help me in this, In TM1 9.5

Thanks and regards

Re: sum of two cubes through TI

Posted: Tue Jul 03, 2012 3:29 pm
by tomok
it's almost impossible to debug someone's Ti code without the actual code being posted.

Re: sum of two cubes through TI

Posted: Tue Jul 03, 2012 8:00 pm
by Wim Gielis
Best way would be to have a cube or dimension to keep track of what you ran, how many times, when, ... and so on.
But this involves coding beyond the TI wizard capabilities, not sure you are up to it, honestly.