+ Reply to Thread
Results 1 to 3 of 3

Pivot Table Calculated Field Summing incorrectly

  1. #1
    Registered User
    Join Date
    04-25-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    3

    Pivot Table Calculated Field Summing incorrectly

    Hi all,

    I have a calculated field that sums number of days multiplied by a day rate for several people on a project.
    However the sub total in the pivot table is incorrect as the calculation is summing all rows as well as individual rows (hard to explain).

    Resource Rate May4 May11 May18 May25
    1177.5 1 1 1 1
    660 1.5 1 1.5 2

    This is the date the calculated field is based on. I want to calculate "May Spend".

    The formula in the calculated field is (May4+May11+May18+May25)*Resource Rate. So manually that should be ((1+1+1+1)*1177.5)+((1.5+1+1.5+2)*660))

    When viewed in the pivot table the spend per resource is showing correct however if showing sub-totals, the sub-total are all wrong as the calculation is doing this: ((1+1+1+1)*1177.5)+((1.5+1+1.5+2)*660)+((1177.5+660)*(1+1+1+1+1.5+1+1.5+2)))

    It's probably a really simple one but it's got me baffled (I'm new to pivot tables and calculated fields).

    I have attached the Excel file.

    Thanks team!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Pivot Table Calculated Field Summing incorrectly

    See here 2 works around:
    Draft Pivot1.xlsx where an extra column is added for each month in the database May-Spend1, Jun-Spend1 ... making the calculation for each month

    Draft Pivot2.xlsx where 3 extra columns are added and all date's columns deleted:
    column Date, Load and column ResLoad to make the calculation Load * Resource Rate => This formula does not work properly neither when recorded in the PT ...!

    Note: A possible reason of the issue is that data is not completely in column : Exists a column for each date, but why in Draft Pivot2.xlsx it does not work ...!
    Attached Files Attached Files
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Pivot Table Calculated Field Summing incorrectly

    FYI, calculated fields always sum their constituent fields before doing anything else, so your formula is actually:

    (SUM(May4)+SUM(May11)+SUM(May18)+SUM(May25))*SUM(Resource Rate)

    and not what you want, which would be:

    SUM((May4+May11+May18+May25)*Resource Rate)
    Rory

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Creating calculated field and calculated item into a pivot table
    By dvpe in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 12-12-2019, 12:15 PM
  2. Replies: 1
    Last Post: 01-15-2019, 08:54 PM
  3. Replies: 0
    Last Post: 08-15-2016, 02:07 PM
  4. Pivot table incorrectly summing & producing strange numbers (-2.66454E-15)
    By Brontosaurus in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-21-2013, 04:07 AM
  5. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  6. [SOLVED] pivot table formulas for calculated field or calculated item
    By Vicky in forum Excel General
    Replies: 3
    Last Post: 06-06-2006, 12:10 AM
  7. Pivot calculated field not summing correctly
    By cgcordry in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-28-2005, 03:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1