Sub topic 3
Layout, Subtotals, and Number Formatting
Assume you can navigate Excel, select ranges, and use simple formulas. This chapter focuses on controlling an existing PivotTable and checking its results.
Layout and formatting
Select the PivotTable to open the Design and PivotTable Analyze tabs. In Report Layout, choose Show in Tabular Form for a clear column structure. Use Subtotals to show subtotals at the top or bottom of each group. Use Grand Totals to control overall totals.
Apply number formats through Value Field Settings > Number Format, rather than formatting individual cells. This keeps the format after refreshes.
| Setting | Useful choice |
|---|---|
| Report Layout | Show in Tabular Form |
| Subtotals | Show at Bottom of Group |
| Values | Currency, number, or percentage format |
Refreshing and changing the source
Right-click the PivotTable and choose Refresh after editing its source. An Excel Table is usually the safest source because new rows become part of the table automatically. For a fixed range, use PivotTable Analyze > Change Data Source, then select the updated range.
> Callout note > A refresh recalculates the PivotTable, but it does not automatically fix incorrectly typed source data.
Showing comparisons
In Value Field Settings, use Show Values As to display:
- % of Grand Total for each item’s share.
- Running Total In for cumulative progress.
- % Difference From to compare with a prior period.
Slicers and timelines
Use PivotTable Analyze > Insert Slicer for categorical fields such as Region. Use Insert Timeline for a real date field. These controls filter the PivotTable interactively and can connect to multiple PivotTables through Report Connections.
PivotCharts and calculated fields
Select the PivotTable and choose PivotTable Analyze > PivotChart. A column chart works well for comparing categories; a line chart works well for dates.
A calculated field creates a measure from existing fields:
Name: AvgPrice
Formula: =Sales/UnitsFor more complex models, calculate the measure in the source data or Power Pivot instead.
GETPIVOTDATA and troubleshooting
Excel can read a PivotTable value with:
=GETPIVOTDATA("Sales",$A$3,"Region","West")$A$3 is any cell inside the PivotTable. The formula remains reliable when the layout moves.
Blank or incorrect results commonly come from:
- Numbers stored as text. Convert them before refreshing.
- Blank labels or missing source values.
- A stale PivotTable. Refresh it.
- A date column containing text. Convert it to real Excel dates.
- A source range that excludes new records. Change it to an Excel Table.
Exercise
A percentage looks wrong after refresh. What should you check first?
Show answer
Check the Value Field Settings and confirm that Show Values As uses the intended base field and calculation.