Table of Contents
- Introduction to pivot tables
- Create pivot table
- Group data
- Analyze data (pivot table)
- Compare performance, year to year, quarter to quarter (previous year), month to month (previous year)
- Product trends
- Region trends
Introduction to pivot tables
A pivot table can quickly summarize and categorize many table records into a single report. Here is a picture of a table containing random fake data.
Let me show you what you can do with the data above and a pivot table.
You can group dates into months, quarters and years and sum corresponding data.
You can also categorize data into regions, products, salesperson or whatever categories you may find interesting.
It is possible to spot sales trends and quickly examine the underlying data, for instance on specific years, regions or products. Later in this post I'll show you how to compare sales from year to year or any year. The pivot table is somewhat "intelligent" and knows that you are interested in comparing selected (expanded) quarters or months.
Create a pivot table
Now your pivot table looks like this:
- Click and hold on Date in Pivot table field list
- Drag and release over "Row labels" area
- Right click on any date in the pivot table
- Click Group...
- Select months, quarters and Years
- Click OK
Analyze data (pivot table)
Add "Amount" to the pivot table.
- Click and hold "Amount" in the pivot table field list
- Drag and release over Values area.
Click again + on a quarter and months are displayed.
Compare performance, year to year, quarter to quarter (previous year), month to month (previous year)
Add pivot table field "Amount" to the Values "Area". You already did that? Do it again.
- Click on "Sum of Amount" field in "Values" area
- Click "Value Field Settings..."
- Go to tab "Show Values As"
- Select Show values as "Difference From"
- Select Years in Base field
- Select (previous) in Base item.
- Click OK
Notice that there are no +/- values in the quarters. That´s because only one year is expanded. Let's compare with year 2010, expand 2010.
Sales were pretty good in the three first quarters but the fourth quarter was terrible. You can quickly compare sales to year 2009. Collapse 2010 and expand 2009.
Which products show a decline in sales quarter 4, 2011?
- Click "arrow" near "Row Labels"
- Select only year 2010 and 2011
- Remove "Sum of Amount" in Values "Field"
- Drag Products from Pivot table field list to Column area.
Do all markets have the same decline in sales? This time calculate % difference from the same quarter last year.
- Click on "+/-" in Values area.
- Click "Value Field Settings"
- Change Custom name to "%"
- Change Show values as: % Difference From
- Click Ok
- Remove Products from Column Labels area
- Add Region to Column Labels area
All markets show a decline in sales.
The data is random and from 2005-01-01 to 2011-11-05. That is why sales decline in quarter 4, 2011.
Download excel *.xlsx file
Analyze trends.xlsx (2 MB)