Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Collapse]Data Shaping
    [Expand]Aggregation
     Grouping
    [Collapse]Sorting
      Data Sorting
      Display Top N Values
      Sorting by Summary
    [Expand]Filtering
   [Expand]Data Analysis
   [Expand]Data Formatting
   [Expand]Layout
   [Expand]Appearance
   [Expand]Data Export
   [Expand]Design-Time Features
   [Expand]UI Elements
   [Expand]Examples
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Display Top N Values

In some instances, end-users do not wish to browse through an entire report, and only need to see the best or worst results. For this purpose, Pivot Grid provides the Top N Values feature that can be used to limit the number of field values to the specified number of topmost values according to the sort order.

To enable this feature, use the PivotGridFieldBase.TopValueCount property. This property allows you to restrict the number of field values that are displayed along the column or row axis. If the PivotGridFieldBase.TopValueCount property is set to 0, ASPxPivotGrid displays all field values.

By default, the PivotGridFieldBase.TopValueCount property determines the absolute number of field values to display. You can also use this property to specify the required number as a percentage ratio. Note that in this instance, you should set the PivotGridFieldBase.TopValueType property to PivotTopValueType.Percent.

The meaning of this percentage ratio depends on the current data binding mode as follows.

  • In a regular data binding mode, the PivotGridFieldBase.TopValueCount property value defines the percentage of the displayed field values among all field values. For instance, if the PivotGridFieldBase.TopValueCount property is set to 50, PivotGridControl will display the first half of field values in the current field.
  • 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 50, PivotGridControl will display values whose cumulative total is not less than a half of the Grand Total value.

If the Top N Values feature is enabled, the pivot grid displays the first field values according to the current sort order. The other values are hidden and are not used to calculate totals. To display this information, set the field's PivotGridFieldBase.TopValueShowOthers property to true. The remaining (hidden) values are combined into a single item ('Others'). The 'Others' item is displayed below field values.

Note

In an OLAP mode, totals are calculated against all values even if the Top N Values feature is enabled.

How would you rate this topic?​​​​​​​