Solved

Excel 2010 PivotTable- help creating a complex 'Calculated Field'

Posted on 2014-07-24
2
480 Views
Last Modified: 2014-07-24
I am trying to compare similar records from two different sources.
I would like to identify those 'Item's where the Qtys are different.

The data sheet looks like the following:
Source      Item        Qty   (see attached file also)
File A         X             10
File B         X             10
File A         Y               2
File B         Y               3
File A         Z               8
File B         Z               4

I created a PivotTable with the following fields:
Row Labels = 'Item'
Column Labels = 'Source'
Values = 'Qty' (sum)

The data records for the 'Column Label' called 'Source' contains only 'File A' or 'File B'.

Is there a way to create a 'Calculated Field' within the PivotTable that can display the difference between the 'Qty' of the two Sources?
C--Users-jgeiselman-Desktop-PivotTable-E
0
Comment
Question by:Jeff Geiselman
2 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 250 total points
ID: 40218087
To do it all as a PivotTable does not work, but you can get close to it be creating Calculated Items for your Source field.

1) Select the Source field in the PivotTable
2) On the Ribbon, select PivotTable Tools/Options/Calculations/Fields Items and Sets, and pick Calculated Item
3) Create calculated items for Difference (Field B - Field A), and Grand Total (Field A + Field B)
4) Turn off column grand totals for the PivotTable
0
 
LVL 1

Author Closing Comment

by:Jeff Geiselman
ID: 40218166
Thanks, that will do quite nicely.
I was trying 'Calculated Fields' instead of  'Calculated Items'.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
: Microsoft Office Collaborate for free and online versions of Microsoft  Word, Excel, Powerpoint, OneNote, Onedrive , Email, Calendar etc. In short we can say that Microsoft office is a suite of servers, applications and services developed by  Micr…
Viewers will learn the different options available in the Backstage view in Excel 2013.
Viewers will learn the basics of the new Quick Analysis feature in Excel 2013.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question