New to Kendo UI for Angular? Start a free 30-day trial

Angular PivotGrid Aggregates

Aggregates in PivotGrid serve to combine and summarize data across different dimensions. These aggregates enable users to perform calculations such as sum, average, count, and more, providing a comprehensive overview of the data from various perspectives.

The following example demonstrates some of the built-in aggregates of the PivotGrid in action.

View Source
Change Theme:

To aggregate the PivotGrid data, set the measures property of the kendoPivotLocalBinding directive to a Measure collection.

<kendo-pivotgrid [measures]="measures" ... ></kendo-pivotgrid>

You can set the aggregate property to:

  • an Aggregate object
  • predefined built-in aggregates. Below is a list of supported built-in aggregates applicable for local data binding only:
    • sumAggregate
    • minAggregate
    • maxAggregate
    • averageAggregate
    • countAggregate
import { Measure, minAggregate, sumAggregate} from '@progress/kendo-angular-pivotgrid';

public measures: Measure[] = [
        name: 'Total',
        value: (item: DataItem): number => item.Price, aggregate: sumAggregate
    }, //...

To display specific aggregates during initialization, set the measureAxes property to a PivotGridAxis collection.

public defaultMeasureAxes: PivotGridAxis[] = [
    { name: ['Total'] },
    { name: ['Min'] }

In this article

Not finding the help you need?