XL97: Calculated Field Returns Incorrect Grand Total

Last reviewed: February 12, 1998
Article ID: Q162477
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

In a PivotTable, Microsoft Excel may incorrectly calculate the grand total for a calculated field.

CAUSE

This problem occurs when you use a calculated field (a field based on other fields) in a PivotTable, and the calculated field is defined by performing a higher order arithmetic operation, such as exponentiation, multiplication or division, on other fields in the PivotTable. For example, this problem occurs when you use a calculated field named Revenues that returns the multiple of the fields Units*Price. The individual items in the calculated field return the expected results; however, the grand total does not return the expected result for the calculated field.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

When a calculated field includes more than one field in the data range, Microsoft Excel computes the grand total for the sum of each component field, and then performs the arithmetic operation. For example, the following example PivotTable contains a calculated field named Revenue, which is defined as Price * Units.

   A1: Sum of Revenue  B1:           C1:         D1:
   A2: Product         B2: Units     C2: Price   D2: Total
   A3: Alpha           B3: 1         C3: 10      D3: 10
   A4:                 B4: 1 Total   C4:         D4: 10
   A5: Alpha Total     B5:           C5:         D5: 10
   A6: Bravo           B6: 2         C6: 11      D6: 22
   A7:                 B7: 2 Total   C7:         D7: 22
   A8: Bravo Total     B8:           C8:         D8: 22
   A9: Charlie         B9: 3         C9: 12      D9: 36
   A10:               B10: 3 Total  C10:        D10: 36
   A11: Charlie Total B11:          C11:        D11: 36
   A12: Grand Total   B12:          C12:        D12: 198

The grand total of 198 does not equal the subtotals of 10+22+36, which is 68. Microsoft Excel computes the grand totals for the calculated field Revenues as follows:

   SUM(Units)*SUM(Price)

   or

   SUM(1+2+3)*SUM(10+11+12)

which is 6*33=198.

For additional information on using Calculated Fields, please see the following article in the Microsoft Knowledge Base:

   Article-ID: Q161882
   TITLE     : XL97: Using PivotTable Calculated Fields and Calculated
               Items

REFERENCES

For more information about calculated fields, click the Index tab in Help, type the following text

   PIVOTTABLES, calculated fields

and then double-click the selected text to go to the "Create a calculated field in a PivotTable" topic.


Additional query words: 97 XL97 calculation
Version : WINDOWS:97
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 12, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.