Skip to main content

PivotGridFieldBase.TopValueType Property

Gets or sets how the number of Top Values is determined.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v24.2.Core.dll

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

Declaration

[DefaultValue(PivotTopValueType.Absolute)]
public PivotTopValueType TopValueType { get; set; }

Property Value

Type Default Description
PivotTopValueType Absolute

A PivotTopValueType value that specifies how the number of Top Values is determined.

Available values:

Name Description
Absolute

The PivotGridFieldBase.TopValueCount property determines the absolute number of top field values to display. For instance, if there are 20 unique field values and the TopValueCount property is set to 10, only the 10 top field values will be displayed.

Percent

In a regular data binding mode, the PivotGridFieldBase.TopValueCount property determines the number of field values to display relative to the total number of field values. For instance, if there are 20 unique field values and the PivotGridFieldBase.TopValueCount property is set to 10, only 2 top field values (10% out of 20) will be displayed.

In an OLAP mode, PivotGridControl will display top values whose cumulative total is equal to or greater than a specified percentage. For instance, if the PivotGridFieldBase.TopValueCount property is set to 10, PivotGridControl will display values whose cumulative total is not less than 10% of the Grand Total value.

Sum

The PivotGridFieldBase.TopValueCount property determines the maximum allowed sum of the corresponding summary values. For instance, if the PivotGridFieldBase.TopValueCount property is set to 100, the PivotGridControl will display field values whose cumulative total does not exceed 100.

Works in OLAP mode only.

Remarks

PivotGridControl supports the Top N Values feature, that allows you to display the first top field values (which are the most significant in most cases) whilst ignoring the other values. To enable this feature, the PivotGridFieldBase.TopValueCount property should be set to a positive value.

If the TopValueType property is set to PivotTopValueType.Absolute, the PivotGridFieldBase.TopValueCount property determines the absolute number of top field values to display. For instance, if there are 20 unique field values and the TopValueCount property is set to 10, only the 10 top field values will be displayed.

If the TopValueType property is set to PivotTopValueType.Percent, the effect depends on the current data binding mode as follows:

  • In a regular data binding mode, the PivotGridFieldBase.TopValueCount property determines the number of field values to display relative to the total number of field values. For instance, if there are 20 unique field values and the PivotGridFieldBase.TopValueCount property is set to 10, only 2 top field values (10% out of 20) will be displayed.
  • In an OLAP mode, PivotGridControl will display top values whose cumulative total is equal to or greater than a specified percentage. For instance, if the PivotGridFieldBase.TopValueCount property is set to 10, PivotGridControl will display values whose cumulative total is not less than 10% of the Grand Total value.
See Also