This example uses the calculateSummaryValue function to detect Grand Total and Total rows and columns in the DevExtreme PivotGrid and applies custom aggregation logic to each cell type.