React pivot table column calculated (balance).

Hi,
   In pivot table, I have the following table :
   
                          date 1           date 2        date 3     ....             
   initial_value     $100           ???            ???
   movement 1     $200           $50 
   movement 3     -$100          -$100   
   grand total        $200           
  
   I would like to do that the value for initial column date 2 (and date 3, etc) would be equal to grand total column left.
   For column date2 the value would be: $200.
   For column date3 the value would be: $150.   
   It's a calculated value (it is a balance).
   * for movement "initial value" of column j =>   value !=0 ? initial_value: grand total of column (j-1).
   
   Is there any way to do this calculation ?. 
   I see examples of fields calculated in the documentation but differing from my needs.
   

Thanks in advance.
Jorge   

3 Replies 1 reply marked as answer

SS Saranya Sivan Syncfusion Team May 5, 2021 02:43 PM UTC

Hi JORGE, 
  
The reported requirement cannot be achieved directly but we suggest you to do the customization manually. It can be achieved by using enginePopulated event where you can modify the cell value based on your conditions.  
  
Meanwhile, we have prepared a sample for your reference which is available in the below link. 
  
  
Please let us know if you have concerns. 
  
Regards, 
Saranya S. 
 


Marked as answer

JV JORGE V May 6, 2021 03:40 PM UTC

Hi Saranya Sivan

In the enginePopulated event  I modified the values of args.pivotValues.
It seems Ok, thank you.

Jorge


SS Saranya Sivan Syncfusion Team May 7, 2021 04:56 AM UTC

Hi Jorge, 
  
Thanks for the reply. 
  
Please let us know if you have any other queries. We are always happy to assist you.  
  
Regards, 
  
Saranya S. 
 


Loader.
Up arrow icon