Sub topic 13
Showing values as percentages, running totals and differences
This chapter assumes you can build a PivotTable with Rows and Values fields and that you can group dates into months. It uses the sales data from earlier chapters.
What Show Values As does
A value field normally shows a raw result such as Sum of Sales. Show Values As recalculates each cell relative to other cells in the PivotTable. The source data does not change, and the setting applies to one value field at a time.
To use it, right-click a number in the Values area, choose Show Values As, and pick a calculation. You can also open Value Field Settings and use the Show Values As tab.
Percentages
Set Rows to Region and Values to Sum of Sales. The totals are East 690 and West 480, with a grand total of 1170.
Rows: Region
Values: Sum of Sales
Show Values As: % of Grand TotalEast now shows 59.0% and West shows 41.0%. Pick the base that matches your question:
| Option | Each cell is divided by |
|---|---|
| % of Grand Total | The total of the whole PivotTable |
| % of Column Total | The total of its column |
| % of Row Total | The total of its row |
| % of Parent Row Total | The subtotal of the field above it |
With Region in Rows and Product in Columns, % of Row Total shows each region's mix of Widget and Gadget sales. % of Column Total shows each product's split between regions.
Running totals and differences
These options need a base field, which sets the order and the comparison. Group Date by Months and put it in Rows. Monthly sales are 430 (January), 615 (February) and 125 (March).
Rows: Date (grouped by Months)
Values: Sum of Sales
Show Values As: Running Total In
Base field: DateThe running total column reads 430, 1045 and 1170. Choose Difference From with the base field Date and the base item (previous) to get the change from the prior month. February shows 185 and March shows -490. % Difference From gives the same comparison as a percentage.
Common errors
- Wrong order: running totals follow the sort order of the base field. Sort the field first.
- First row is blank: with (previous) as the base item, the first item has nothing to compare against, so its cell is empty.
- Unexpected percentages: a percentage option that does not match your layout, such as % of Column Total in a one-column table, returns 100% in every cell.
- Two views of one measure: drag Sales into Values twice. Show one copy as a raw sum and the other as a percentage, and rename them (for example "Sales" and "Share of Sales").
Exercise
A PivotTable has Month in Rows and Sum of Sales in Values. Monthly sales are 430, 615 and 125. Which Show Values As option and base item give a column of 185 and -490 beside the first month's blank cell?
Show answer
Use Difference From, with Month as the base field and (previous) as the base item. February is 615 - 430 = 185 and March is 125 - 615 = -490. January is blank because it has no previous month.