Code: Select all
nVariable= 500;
NewElement=CellGetN('CellCube','ProductA','CustomerA','RegionA',cmeasures);
CreatedVariable=nVariable +NewElement ;
CellPutN( CreatedVariable , 'CellCube','ProductA','CustomerA','RegionA',cmeasures);
Code: Select all
nVariable= 500;
NewElement=CellGetN('CellCube','ProductA','CustomerA','RegionA',cmeasures);
CreatedVariable=nVariable +NewElement ;
CellPutN( CreatedVariable , 'CellCube','ProductA','CustomerA','RegionA',cmeasures);
The obvious issues:BariAbdul wrote:I am using CellGetN and CellPutN to add a numeric value in the Cube.When cube is empty and although I have defined variable value 500 ,When it should show '0+500' as 500 it still shows 0 when I open the Cube view,But when I enter manually 1 in the targeted cells and runs again It shows 1001 taking in to account the previous value. Could someone Please help me what could be the reason? Thanks.Code: Select all
nVariable= 500; NewElement=CellGetN('CellCube','ProductA','CustomerA','RegionA',cmeasures); CreatedVariable=nVariable +NewElement ; CellPutN( CreatedVariable , 'CellCube','ProductA','CustomerA','RegionA',cmeasures);
b)You are also correct that it is View as a source,In fact I have created the view from the same cube and used it as a source.It has no zero suppressed on, Could it be due to the fact this cube was empty with zero values is cause of the issue.(b) The fact that it doesn't do anything when the value is 0 but does when the value is 1 suggests that you have a data source issue. Speaking of which, you haven't indicated the data source either but I'm betting that it's a cube view. If that is indeed the case you most likely have zeroes suppressed on the view
My apologies,I am not getting what you are actually trying to say here.Thanks a lot again.If that's the case, then when the original value is 0 it's probably not part of your data source. When it's 1, it is.
If it's not part of the data source, then your code will never be executed for that combination.