Author: Oscar Cronquist Article last updated on October 25, 2019

Table of Contents

  1. Introduction to pivot tables
  2. Create pivot table
  3. Group data
  4. Analyze data (pivot table)
  5. Compare performance, year to year, quarter  to quarter (previous year), month to month (previous year)
  6. Product trends
  7. 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

  1. Click any cell in your table
  2. Go to tab "Insert"
  3. Click "Pivot table" button
  4. Click OK

Group data

Now your pivot table looks like this:

  1. Click and hold on Date in Pivot table field list
  2. Drag and release over "Row labels" area
  3. Right click on any date in the pivot table
  4. Click Group...
  5. Select months, quarters and Years
  6. Click OK

Analyze data (pivot table)

Add "Amount" to the pivot table.

  1. Click and hold "Amount" in the pivot table field list
  2. Drag and release over Values area.

All sales in each year are summarized.

Click on any + to expand that specific year. Since you grouped dates into years, quarters and months, the next "level" is quarters.

Click again + on a quarter and months are displayed.

You can expand or collapse all fields with one click. Right click on any date and select "Expand Entire Field".

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.

  1. Click on "Sum of Amount" field in "Values" area
  2. Click "Value Field Settings..."
  3. Go to tab "Show Values As"
  4. Select Show values as "Difference From"
  5. Select Years in Base field
  6. Select (previous) in Base item.
  7. Click OK

There is a sharp decline in sales in 2011. Expand 2011.

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.

See that! Values in the +/- column changed! Quarters in 2011 are now compared to quarters in 2009.

Product trends

Which products show a decline in sales quarter 4, 2011?

  1. Click "arrow" near "Row Labels"
  2. Select only year 2010 and 2011
  3. Remove "Sum of Amount" in Values "Field"
  4. Drag Products from Pivot table field list to Column area.

"Access points" and "Modems" have the largest declines in sales in quarter 4, 2011.

Region trends

Do all markets have the same decline in sales? This time calculate % difference from the same quarter last year.

  1. Click on "+/-" in Values area.
  2. Click "Value Field Settings"
  3. Change Custom name to "%"
  4. Change Show values as: % Difference From
  5. Click Ok
  6. Remove Products from Column Labels area
  7. Add Region to Column Labels area

All markets show a decline in sales.

Final thoughts

The data is random and from 2005-01-01 to 2011-11-05. That is why sales decline in quarter 4, 2011.

Download Excel file


Recommended articles