Excel Pivot Tables
Create & configure Β· Slicers Β· Grouping Β· Calculated fields Β· Value settings Β· Pivot charts
Sheet 2 of 3
Excel 365
BeginnerβInter.
Printable
Creating a Pivot Table
- Prepare your data β one header row, no blank rows/columns, no merged cells. Each column = one field.
- Select any cell inside the data range (or select the whole range).
- Insert β PivotTable (ribbon) or press Alt N V.
- Choose location β New Worksheet (recommended) or Existing Worksheet, then click OK.
- Drag fields into the four areas in the PivotTable Fields pane on the right.
- Refresh when source data changes β right-click pivot β Refresh, or Alt F5.
The 4 Pivot Areas
| Area | What it does | Drag here |
|---|---|---|
| Filters | Top-level report filter β shows a dropdown above the pivot | Region, Year |
| Columns | Spreads categories across column headers | Quarter, Month |
| Rows | Groups data down the left side | Product, Name |
| Values | Aggregated numbers in the body | Sales, Revenue |
Format as Table first: Select your data β Ctrl+T β Insert β PivotTable. A Table auto-expands when you add rows, so the pivot always includes new data after refresh.
Value Field Settings
Summarise Value By
| Function | Returns |
|---|---|
| Sum | Total of values (default for numbers) |
| Count | Count of entries (default for text) |
| Average | Mean of values |
| Max / Min | Highest / lowest value |
| Product | Multiplies all values together |
| StdDev | Standard deviation (sample) |
| Var | Variance (sample) |
Show Values As β % & more
| Option | Shows |
|---|---|
| % of Grand Total | Each cell as % of overall total |
| % of Column Total | % within each column |
| % of Row Total | % within each row |
| % of Parent Row | % of the subtotal above |
| Running Total In | Cumulative sum down a field |
| Rank LargestβSmall | Rank 1 = highest value |
| Difference From | Delta vs a base item |
How to access: Right-click any value cell β Value Field Settings. Change both the summarise function and the "Show Values As" display on two separate tabs.
Grouping
Group Dates Automatically
- Add a date field to Rows or Columns.
- Excel 2016+ auto-groups into Years β Quarters β Months. Expand/collapse with the +/β buttons.
- To customise: right-click a date cell β Group β pick Seconds / Minutes / Hours / Days / Months / Quarters / Years.
- To ungroup: right-click β Ungroup.
Group Numbers & Text
- Numbers β right-click a number row item β Group β set Starting at, Ending at, By (interval, e.g. 10 for age brackets 0β9, 10β19β¦).
- Text / manual β hold Ctrl and click the row items you want to group β right-click β Group. A "Group1" label appears; rename it by typing.
Date grouping requires real dates. If Excel won't group, the date column contains text. Fix with
DATEVALUE() or Data β Text to Columns β Date format.Slicers & Timelines
Insert a Slicer
- Click anywhere inside the pivot table.
- Go to PivotTable Analyze β Insert Slicer (or Insert β Slicer).
- Tick the field(s) you want β e.g. Region, Category.
- Click OK β a floating slicer panel appears.
- Click any button on the slicer to filter the pivot instantly.
- Hold Ctrl to select multiple slicer items.
- Click the Γ (Clear Filter) icon top-right to reset.
Connect Slicer to Multiple Pivots
- Right-click the slicer β Report Connections.
- Tick all the pivots you want this slicer to control.
- Click OK β one slicer now filters all connected pivots simultaneously.
Insert a Timeline (Date Slicer)
- Click the pivot β PivotTable Analyze β Insert Timeline.
- Select a date field β OK.
- Use the dropdown to switch between Years / Quarters / Months / Days.
- Drag the handles to filter a date range.
Slicer Tips
Style a slicer Click slicer β Slicer tab β choose a Slicer Style β Slicer Settings to rename caption, sort order Multi-column slicer buttons Slicer tab β Columns: 3 Resize slicer to fit Remove a slicer Click it β Delete key
Slicers work on Tables too β insert a slicer on a formatted Table (Ctrl+T) to filter it without a pivot.
Calculated Fields & Items
Insert a Calculated Field
- Click inside the pivot β PivotTable Analyze β Fields, Items & Sets β Calculated Field.
- Give it a Name (e.g. Profit Margin).
- Build the formula using field names from the list β double-click to insert.
- Click Add then OK.
Example Calculated Field Formulas
Profit margin % = Profit / Revenue Tax amount = Revenue * 0.18 Revenue per unit = Revenue / Units Bonus flag = IF(Sales > 10000, Sales * 0.05, 0)
Calculated fields use entire column totals β they can't reference individual cells. For complex logic, add a helper column to the source data and refresh the pivot instead.
Sorting, Filtering & Layout
Sorting Pivot Data
Sort by row labels AβZ Click row label dropdown β Sort A to Z Sort by values (e.g. highest sales first) Click value cell β Sort β Sort Largest to Smallest Manual drag sort Hover edge of item cell until cursor shows 4-arrow β drag
Layout Options
| Layout | Best for |
|---|---|
| Compact | Default β all row fields in one column. Saves space. |
| Outline | Each row field in its own column, with subtotals above. |
| Tabular | Classic table look β easiest to copy/paste out. No indent. |
Change layout: PivotTable Analyze β Design β Report Layout β choose Tabular for the most copy-friendly format.
Pivot Charts
Insert a Pivot Chart
- Click inside the pivot table.
- PivotTable Analyze β PivotChart (or Insert β PivotChart).
- Choose chart type β Column, Bar, Line, Pie, etc. β OK.
- The chart links live to the pivot β filter the pivot and the chart updates instantly.
- Slicers connected to the pivot also filter the chart automatically.
Chart Type Guide
| Chart | Use when⦠|
|---|---|
| Clustered Column | Compare categories side by side |
| Stacked Bar | Show part-to-whole across categories |
| Line | Trend over time |
| Pie / Doughnut | Single series composition (<6 slices) |
| Combo | Two metrics with different scales |
| Treemap | Hierarchical part-to-whole |
| Waterfall | Running total, gains & losses |
Hide Chart Field Buttons
Field buttons clutter the chart β hide them for presentations Right-click a field button β Hide All Field Buttons on Chart Re-show: PivotChart Analyze tab β Field Buttons β Show All Move chart to its own sheet Right-click chart border β Move Chart β New sheet
Essential Pivot Keyboard Shortcuts
Create & Refresh
Alt N V Insert PivotTable
Alt F5 Refresh pivot
Ctrl Alt F5 Refresh all
Alt F4 Close dialog
Navigate & Select
Tab Move to next field
Enter Expand/collapse
β β Collapse/expand group
Ctrl * Select entire pivot
Format & Group
Alt Shift β Group selection
Alt Shift β Ungroup selection
Ctrl T Format as Table
Ctrl 1 Format cells dialog
Common Mistakes & Best Practices
Data Prep Mistakes
β Blank rows or columns in data β Merged cells in the header β Numbers stored as text (left-aligned) β Dates stored as text strings β Duplicate/inconsistent labels ("North" vs "north" vs "North ") β Clean header in row 1 β No blank rows between data β Consistent text case (PROPER/TRIM) β Format as Table (Ctrl+T) first
Pivot Doesn't Update?
New rows added to source data β Right-click β Refresh β Or: if source is a Table, it expands automatically Source range changed β PivotTable Analyze β Change Data Source β update the range Grand totals wrong β Design β Grand Totals β On for Rows and Columns
Power Tips
Show items with no data Right-click row item β Field Settings β Layout β Show items with no data β Repeat item labels Design β Report Layout β Repeat All Item Labels Custom number format Right-click value β Number Format β Accounting / Custom Preserve formatting on refresh PivotTable Options β Layout β Preserve cell formatting β
Pivot Tables Mastery Checklist
| Build & Configure | Key point |
|---|---|
| Create a pivot from a Table | Ctrl+T first |
| Use all 4 areas correctly | Filters/Cols/Rows/Values |
| Change summarise function | Value Field Settings |
| Show values as % | % of Grand Total |
| Filter & Group | Key point |
|---|---|
| Add interactive filter button | Insert Slicer |
| Connect slicer to many pivots | Report Connections |
| Filter by date range visually | Insert Timeline |
| Group dates into months/quarters | Right-click β Group |
| Advanced | Key point |
|---|---|
| Add a custom formula to pivot | Calculated Field |
| Create a linked chart | PivotChart |
| Refresh data after update | Alt + F5 |
| Fix data not updating | Change Data Source |
Next up β Sheet 3: Excel Charts Β·
bar Β· line Β· scatter Β· sparkline Β· combo β create professional charts, format axes, add trendlines, and build dashboards.