Skip to content

DevExpress-Examples/web-forms-pivot-grid-calculate-total-cell-values-based-on-the-low-level-cell-summary-values

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pivot Grid for Web Forms - How to Calculate Totals for the Minimum Values

This example calculates summaries for the minimum ProductAmount values. Minimum values are calculated in a group defined by the year, a company and a product.

The example demonstrates two different approaches - the legacy approach that uses the CustomSummary event, and the approach avialble in the Optimized mode - an expression with the Aggr function.

Optimized Mode - Use the Aggr Function

This approach adds a PivotGrid field bound to the following expression:

Aggr(Min(Aggr(Min([ProductAmount]), GetYear([OrderDate]), [ProductName], [CompanyName])), GetYear([OrderDate]), [CompanyName])

Legacy Approach - Handle the CustomSummary Event

You can handle the CustomSummary event to calculate custom summaries. The code demonstrates how to get the underlying data, group them and calculate the summaries.

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Contributors 5