5
readers helped!

This helped me

How to Calculate Difference in Pivot Table

While pivot tables are very useful features for analyzing and explaining data in Excel, they can also be confusing to work with. Some functions, such as calculating differences, must be accomplished in a certain way if they are to work correctly. The process is not well explained within Excel's help feature, so here's how to calculate difference in pivot tables without using extraneous formulas.

Steps

  1. How.com.vn English: Step 1 Launch Microsoft Excel.
  2. How.com.vn English: Step 2 Open the spreadsheet containing the pivot table and source data you are working with.
  3. How.com.vn English: Step 3 Select the worksheet tab containing the source data.
    • This may, or may not, be the same sheet where your pivot table is located.
  4. How.com.vn English: Step 4 Determine the calculation you would like to add.
  5. How.com.vn English: Step 5 Insert a column for the calculated difference amounts.
    • For instance, assume you want your pivot table to include a field showing the difference between column G and column H and both columns contain numerical fields.
    • Right-click on column I and choose "Insert Column" from the pop-up menu. A column will be inserted to the right of column H and all columns of data beyond that column will be shifted one place to the right.
  6. Step 6 Enter a name for the column such as "Difference."
  7. How.com.vn English: Step 7 Create a formula in the first cell of your new column to calculate your differences.
    • Using the above example, your formula would look like "=H1-G1" if you are subtracting column G from column H; "=G1-H1" if you are doing the reverse.
    • Make sure you choose the correct syntax for your formula to return a positive or negative number as desired.
  8. How.com.vn English: Step 8 Copy and paste the formula through the rest of the new column.
  9. How.com.vn English: Step 9 Click on the ​worksheet tab containing your pivot table, if it is different from the location of your source data.
  10. How.com.vn English: Step 10 Alter the source data for your pivot table.
    • In Excel 2003, relaunch the pivot table wizard utility by clicking inside the pivot table and choosing "Wizard" from the pop-up menu.
    • In Excel 2007 or 2010, click the "Change Source Data" button on the Pivot Tools Options tab.
    • Either click and drag to highlight a new range or simply edit the range formula already in the "Range" field to include the following column.
  11. Step 11 Refresh your pivot table by clicking the "Refresh" button.
  12. How.com.vn English: Step 12 Add the difference...
    Add the difference column to your pivot table by clicking the column name, dragging it and dropping it into the "Values" field of the pivot table wizard.
    • You may need to reorder the column names in the "Values" section to make the columns appear in your pivot table in the correct order. You can click and drag from the "Values" section or directly within the pivot table to rearrange the order of your columns.
    Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit

      Advertisement

      Tips

      • Double check the totals returned in your pivot table against the source data totals. Make sure your pivot table source data range does not include a total row from the source data table. A pivot table would interpret this row as an additional row of data, not a row of sums.
      • Remember that all changes to the actual data shown in a pivot table must take place from within the source data table. You cannot edit or manipulate the contents of the cells in a pivot table.


      Advertisement

      About this article

      How.com.vn is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time. This article has been viewed 113,618 times.
      How helpful is this?
      Co-authors: 6
      Updated: February 6, 2020
      Views: 113,618
      Thanks to all authors for creating a page that has been read 113,618 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement