In my cube with Customers , Year/Month dimensions and measures(revenue ,cost and others) I would like, by a simple TI process, copy values from a generic measure A and paste it into Cost measure.
So, I wrote a process which uses as data source a view for the Measure A where a few values are different by null or zero and, for each iteration in the Data tab, perform a CellPutProportionalSpread on the Cost measure.
Because I don't want modify the Year consolidated value, I hold by process, the year consolidated cell
But, when, after hold the year consolidated cell, i perform the first spread on January, for example, I noticed, logging with ASCII output using the hold cube created for my user, that Year consolidation is deleted! (the cell in the hold cube is not 'C' but it is null)
If I comment the CellPutProportialSpread line I find all the cells exptected as hold (so, it is good)
If I uncomment that line, cells are not hold and values is incorrect because the year value is changed (because the hold is lost)
Have you experience with this strange behavior?
Below I put my simple code:
Code: Select all
CUB = 'My CUBE'; Dim = 'Time'; Hold = '}Hold_' | TM1User() | '_}}_' | CUB; # Copy the value v=CellGetN(CUB, Customer, Time, 'Measure A'); # Remove the possible hold on the destination CellPutS('', Hold, Customer, Time, 'Cost', 'HoldStatus'); # Proportional Spread on the destination CellPutProportionalSpread( v, CUB, Customer, Time, 'Cost'); #Hold the Cost value if(DTYPE(Dim, Time)@='N'); s='H'; else; s='C'; endIF; CellPutS(s, Hold, Customer, Time, 'Cost', 'HoldStatus');