Forum Discussion

swatantra's avatar
swatantra
New Contributor II
2 years ago

Data copied using Eval function gets removed after consolidation

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 

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

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 ?

 

 

 

  • Hi,

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

    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)

     

  • MikeG's avatar
    MikeG
    2 years ago

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

    Regards,

     

  • FredLucas's avatar
    FredLucas
    Contributor III

    Hi,

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

    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)

     

    • MikeG's avatar
      MikeG
      Contributor III

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

      Regards,

       

  • MikeG's avatar
    MikeG
    Contributor III

    Hi swatantra , Intellisense will get you there.  

    Hope this helps