Calculations on Summary Columns in PivotGrid

Hi,

I am trying to use Syncfusion PivotGrid control to achive Pivot functionality in Excel. I have 2 columns say Column1 and Column2 . I want to have a third column calculated as Sum(Column1) / Sum(Column2) *100.

I can calculate individual sums on column1 and column2 using SummaryType = DoubleTotalSum , but I am not getting how to perform calculations on Summary Columns.

Any help will be highly appreciated.

Thanks in advance!

 


1 Reply

VK Vinish Kumar K Syncfusion Team December 4, 2012 08:36 AM UTC

Hi Ruchika,

 

Thanks for your interested in Syncfusion products.

 

Query

Pivot Grid Calculation.

You can achieve this by adding PivotCalculations in pivot grid control. Please refer the following code.

 

Code:

 

this.pivotGridControl1.PivotCalculations.Add(new PivotComputationInfo { FieldName = "Amount", Format = "#,##0", SummaryType = SummaryType.DoubleTotalSum });

 

 

 

Let me know if you have further concerns.

 

Regards,

Vinish.


Loader.
Up arrow icon