Problem: I have two years of data by daily dates. I would like to see year-over-year sales by month.
Strategy: Amazingly, it takes only 10 mouse clicks to create this report. Follow these steps:
- Select one cell in your data set.
- Insert, Pivot Table, OK.
- In the PivotTable Field List, choose Date and Revenue.
- At this point, the Row Labels heading is selected. Move down one cell so that the cell pointer is on a date.
- Choose Group Field. Months is already selected. Add Years. Click OK.
- In the PivotTable Field List, drag Years from the Row Labels drop zone to the Column Labels drop zone. You will now have this report.
- Pivot years to go across the report.
- On the Design tab, open the Grand Totals dropdown and choose On For Columns Only which is the very strange way to delete the grand totals along the right side of the report.
- In D4, type % Growth.
- In D5, type =D5/C5-1. Do not use the mouse or arrow keys while entering this formula!
- Format D5 as a percentage with 1 decimal place.
- Copy D5 down to all rows.
- Select the Sum of Revenue heading. In the Options ribbon tab, click in the Active Field box and change the field name to "Revenue " (with a space after the word Revenue.)
- On the Options ribbon tab, click the Field Headers to prevent those from being shown in the report.
- Year-over-year report created with a pivot table.
Gotcha: If you used the mouse in step 9, you will find that the percentage growth does not change as you copy it down. Go back and re-enter the formula, or follow the steps in "Calculations Outside of Pivot Tables" on page 408.