I am new to TM1(working since last one month) and need your help. The Scenario is:
I have four dimension Dimension1, Dimension2, Dimension3 and Dimension4( in order) in cube 'CubeName'.
attribute1, attribut2, attribute3 and attribute4 are four attribute of Dimension4.
In Data procedure tab, for loading data in cube i have following code.
CELLPUTN(elmAttribute1,CubeName, varDimension1, varDimension2, varDimension3, 'attribute1');
CELLPUTN(elmAttribute2,CubeName, varDimension1, varDimension2, varDimension3, 'attribute2');
CELLPUTN(elmAttribute3,CubeName, varDimension1, varDimension2, varDimension3, 'attribute3');
CELLPUTN(elmAttribute4,CubeName, varDimension1, varDimension2, varDimension3, 'attribute4');
Data is loaded successfully in cube. Here is my problem:
1, 2 ,3, 4 are four attribute in Dimension2.Now I added two attribute A and B in Dimension 2. Attribute A should store sum of value corresponding to 1 and 2. Similarly B should store sum of value of 3 and 4.So When i choose A in Cube, it should show sum value of 1 and 2 for attribute1,attribute2, attribut3 and attribute4. Similarly for B.
I changes the TI code as follow:
CELLPUTN(elmAttribute1,CubeName, varDimension1, varDimension2, varDimension3, 'attribute1');
IF((varDimension2=1)%(varDimension2=2));
sumA=CELLGETN(CubeName, varDimension1, 'A', varDimension3, 'attribute1');
sumA=sumA+varDimension2;
ENDIF;
CELLPUTN(sumA,CubeName, varDimension1, 'A', varDimension3, 'attribute1');
IF((varDimension2=3)%(varDimension2=4));
sumB=CELLGETN(CubeName, varDimension1, 'B', varDimension3, 'attribute1');
sumB=sumB+varDimension2;
CELLPUTN(sumA,CubeName, varDimension1, 'B', varDimension3, 'attribute1');
ENDIF;
Similarly for attribute2, attribute3, attribute4. But this is not giving the right result for A and B

Please take a look and give your suggestion if something wrong is in above code.
Thanks.