wpf-115086-controls-and-libraries-spreadsheet-pivot-table-overview.md
This document introduces the Pivot Table functionality that allows you to perform complex analysis of raw data in a worksheet using pivot tables.
A pivot table represents a summary table used to explore, analyze and aggregate huge amounts of data in a worksheet. It helps break your data into categories and subcategories, and automatically calculates subtotals and grand totals using the most suitable summary function from a predefined list.
Pivot tables in the SpreadsheetControl are interactive. That means you can easily change the layout of the existing report to create a new summary table that will fully meet your analysis requirements. For example, the image gallery below shows three PivotTable reports that allow you to analyze the same business data in different forms.
Source Data
One-dimensional PivotTable Report
Two-dimensional PivotTable Report
Multi-dimensional PivotTable Report
The SpreadsheetControl provides the comprehensive and straightforward Pivot Table API that enables you to create and modify pivot tables in code.
In particular, you can perform the following actions.
Create a pivot table using a cell range as a data source or base your report on the data cache of the existing pivot table.
Organize the structure of a pivot table by adding and arranging its fields.
Calculate summaries against data fields using a wide range of preset aggregate functions.
Change source data for a pivot table.
Refresh a pivot table to obtain the latest data from the source.
Move a pivot table to a new location.
Display a pivot table in a compact, outline, or tabular form.
Format a pivot table by applying a built-in or custom style.
Display or hide subtotals and grand totals for rows and columns.
Insert a blank row after each group of items.
Sort field items in descending or ascending order.
Apply a filter to a pivot table to show or hide specific items, construct the filter expression to display only items that meet the specified condition, or filter report data based on calculated values.
For details, refer to the Pivot Tables section of examples.
Insert a Pivot Table
Organize the PivotTable Structure
Adjust the PivotTable Options
Explore the PivotTable Data
See Also