Data copied using Eval function gets removed after consolidation

swatantra
New Contributor II

When i tried copying the data from one cube to another cube using Eval function with Buffer [Calculate(formula, onEvalDataBuffer, userState)], the data got copied at the base level but as soon as i consolidated it, the data got cleared from the same destination intersections.

On checking the cell status of the destination cell (intersection), i found that the storage type is Calculation 

swatantra_0-1698911510995.png

Whereas, if we use api.Data.Calculate(formula, isDurableCalculatedData), the storage type is DurableCalculation, and consolidation works fine after using this Calculate function.

swatantra_1-1698911657623.png

We do we have a boolean parameter to set the DurableCalc as True or False in the api.Data.Calculate(formula, isDurableCalculatedData) function, but i didn't see any such parameter or setting for Buffers [Calculate(formula, onEvalDataBuffer, userState)].

How can i make the StorageType as Calculation to DurableCalculation for Buffers, so that the values doesn't disappear after consolidation ?

 

 

 

3 ACCEPTED SOLUTIONS

FredLucas
New Contributor III

Hi,

One option would be to use this version of the api.Data.Calculate instead:

FredLucas_0-1698916873930.png

You can skip the different optional dimension filters if not required by just adding commas until you get to the arguments you are interested in (e.g.: onEvalDataBuffer, and isDurableCalculatedData) - example below. 

api.Data.Calculate("A#EvalACCOUNT1 = 12 * Eval(A#ACCOUNT1)",,,,,,,,,,,,,AddressOf OnEvalDataBuffer,,True)

 

View solution in original post

MikeG
Contributor III

Hi @swatantra , Intellisense will get you there.  

MikeG_0-1698930605084.png

Hope this helps

View solution in original post

@FredLucas beat me to it, he posted it first.  Please give him the solution credit.

Regards,

 

View solution in original post

5 REPLIES 5

FredLucas
New Contributor III

Hi,

One option would be to use this version of the api.Data.Calculate instead:

FredLucas_0-1698916873930.png

You can skip the different optional dimension filters if not required by just adding commas until you get to the arguments you are interested in (e.g.: onEvalDataBuffer, and isDurableCalculatedData) - example below. 

api.Data.Calculate("A#EvalACCOUNT1 = 12 * Eval(A#ACCOUNT1)",,,,,,,,,,,,,AddressOf OnEvalDataBuffer,,True)

 

@FredLucas beat me to it, he posted it first.  Please give him the solution credit.

Regards,

 

swatantra
New Contributor II

Thankyou Fred, this worked !

MikeG
Contributor III

Hi @swatantra , Intellisense will get you there.  

MikeG_0-1698930605084.png

Hope this helps

swatantra
New Contributor II

Thankyou Mike, this worked !