PIVOT TABLE
Pivot Table:
A Pivot Table is a data summarization tool in Excel that allows you to reorganize
and summarize selected columns and rows of data to obtain a desired report or
analysis without altering the original dataset.
Basic Structure of a Pivot Table:
1. Rows: The categories you want to analyze.
2. Columns: Data fields you want to compare side-by-side.
3. Values: The data you want to aggregate (sum, average, count, etc.).
4. Filters: Optional filters to focus on specific data subsets.
How to Create a Pivot Table:
Step 1: Prepare Your Data
• Ensure your data is in tabular format (no blank rows/columns).
• Each column should have a header.
• Data should be clean and normalized.
Step 2: Insert Pivot Table
1. Select any cell in your dataset.
2. Go to the Insert tab.
3. Click on PivotTable.
4. Choose the data range and where to place the Pivot Table (new/existing
worksheet).
Step 3: Choose Fields
• Drag fields from the PivotTable Field List into:
© 2025 Ankita Mitra. All rights reserved.
o Rows: for grouping data
o Columns: for categories
o Values: for numerical analysis
o Filters: for top-level filtering
Slicers:
->Slicers are a user-friendly and visual way to filter data in Pivot Tables (and
Pivot Charts).
-> They make filtering interactive and easy, especially for dashboards and
presentations.
->A Slicer is a visual control (a box with buttons) that allows you to filter a
Pivot Table by clicking on field values
How to Insert a Slicer
-> Click anywhere inside your Pivot Table.
-> Go to the PivotTable Analyze tab on the ribbon (or Analyze tab in some
versions).
-> Click on Insert Slicer.
-> In the pop-up box, select the field(s) you want to filter by.
-> Click OK – slicers will appear on your worksheet.
Calculated Fields:
A Calculated Field is a user-defined field in a Pivot Table where you can use a
formula to compute new values based on other fields in your data source.
© 2025 Ankita Mitra. All rights reserved.
Filters and Filter Report Pages:
->Report Filter: Filters the whole Pivot Table based on a selected field (e.g.,
Region).
->Label Filter: Filters row/column labels using text conditions (e.g., begins with
"A").
->Value Filter: Filters items based on value conditions (e.g., Sales > 1000).
->Manual Filter: Check/uncheck items manually from dropdowns.
Filter Report Pages:
-> Automatically creates separate Pivot Table sheets for each item in a Report
Filter field.
-> Use it via:
PivotTable Analyze > Options > Show Report Filter Page.
Dynamic Pivot Table:
A Dynamic Pivot Table automatically updates when your data changes — ideal for
reports and dashboards.
How to Create a Dynamic Pivot Table:
Step 1: Use a Table as Source
-> Select your data range.
-> Go to Insert > Table.
-> Name the table (e.g., SalesData) from the Table Design tab.
Why? Tables expand automatically as you add rows.
Step 2: Insert a Pivot Table from the Table
-> Select any cell in the table.
-> Go to Insert > PivotTable.
© 2025 Ankita Mitra. All rights reserved.
-> Choose New Worksheet or Existing Worksheet.
The Pivot Table now uses a dynamic table as its source.
Step 3: Refresh When Data Changes
After adding or editing data in the table:
-> Click anywhere in the Pivot Table.
-> Go to PivotTable Analyze > Refresh.
GETPIVOTDATA Formula:
Syntax:
=GETPIVOTDATA(data_field, pivot_table, [field1, item1], [field2, item2], ...)
Arguments:
-> data_field: The name of the field you want to retrieve (in quotes).
-> pivot_table: A reference to any cell in the Pivot Table.
-> field1, item1: (Optional) Field and item names to filter the result.
© 2025 Ankita Mitra. All rights reserved.