cellmatrix.net

Pivot Table Difference Between Columns

When I most need it, I always seem to forget how to compute the difference between two pivot table columns. So, it's about time to put it in writing. Assume the following data:

image

Create a simple pivot table with the years as columns and the areas as rows.

image

Next, eliminate the row totals. To do so, right-click any cell within the pivot table and go to Table Options. Deselect "Grand total for rows" from the format options area of the Table Options dialog box.

At this point it's time to create a calculated item that subtracts the 2008 data from the 2007 data. Right-click on the year (cell B2) and select Show Pivot Table Toolbar. In the Pivot Table toolbar, choose Formulas -> Calculated Item. The following dialog box will appear:

image

Add the formula for the calculated item as shown below:

image

To make all of the accountants happy, we need to make the most recent year appear as the first column of the table. To do so, right-click within the column titles (2008, 2007, or Difference) -> Order. You can then move the any of the columns to the right or left to achieve the desired look.

The end-result looks like this:

image

About

Formulas, Charts, and Models Created with Microsoft Excel.

Read more...

Statistics

  • Total Entries - 83
  • Current Viewers - 3
  • Days Online - 467

Categories

Entries by Day

July 2008
S M T W T F S
29 30 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 1 2

Excel Web Logs

Syndicate

Validate

My Resources...

Copyright © 2007 - 2008