+ Reply to Thread
Results 1 to 5 of 5

Pivot Table Calculation Field

  1. #1
    Registered User
    Join Date
    10-30-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    11

    Pivot Table Calculation Field

    I'm stuck. I have a pivot table and I'm trying to calculate a field to get a total dollar value. The formula I used is "Hourly Rate" * "Sum of Hours." The problem with the formula is that excel counts how many times a specific person occurs, instead of just using the sum of hours. i.e If Joe works 8 hours a day for 5 days in a week for $20/hr, excel overstates his pay by thinking he makes $20/hr 5 times * the sum of hours.

    My logic:
    Joe makes $20/hr and works 40hrs, thus: $20*40 = $800.

    Excel:
    Joe makes $20/hr and works 8 hours
    Joe makes $20/hr and works 8 hours
    Joe makes $20/hr and works 8 hours
    Joe makes $20/hr and works 8 hours
    Joe makes $20/hr and works 8 hours

    Joe makes $20/hr (5 TIMES) * 40 total hours = $4,000

    Is there a workaround?

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Pivot Table Calculation Field

    I don't know if you would consider this as being "work around" but at least it does not pay Joe $3,200 more than he earned. I used your same formula for the calculated field, however I changed the field setting to "Running total in" and base field to "Date". I also eliminated the grand totals and sub totals in that field.

    Running Total Calculation Field.xlsx

    Let me know if you have any questions.

  3. #3
    Registered User
    Join Date
    10-30-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Pivot Table Calculation Field

    this is great, thank you JeteMc. Although, this forces me to use the dates in a row label. I was using the date as a report filter and it won't work setup that way. Since I'm pulling data for 150 employees over 3 months, my pivot table turns into 1,300 rows instead of 50. I guess this solves it, maybe not ideal for larger data.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Pivot Table Calculation Field

    That (1300 rows) doesn't sound too good at all. What about a pivot table/formula hybrid where a column header is formatted like those in the pivot table and the column contains the formula
    Please Login or Register  to view this content.
    which multiplies the hourly wage * sum of hours for the dates chosen in the report filter. Here is a file showing how such a solution might look.
    Running Total Calculation Field.xlsx
    Let me know if you have any questions.
    Last edited by JeteMc; 08-05-2015 at 11:29 AM. Reason: spelling

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Pivot Table Calculation Field

    Casper, can you upload an example of how your data is set up? (Go Advanced>Manage Attachments)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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. field calculation in a 3 dimensional pivot table
    By Shimoe in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 01-16-2013, 10:02 AM
  2. Calculated pivot table field using pivot table data in calculation
    By BrittleStar in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 12-10-2012, 05:35 PM
  3. Can Excel 2003 do this? Field Calculation in Pivot Table
    By carysfoj in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-30-2012, 05:45 AM
  4. Dynamic Variable in a pivot table calculation field
    By jwongsf in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-22-2012, 11:48 AM
  5. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  6. Calculation field in Pivot Table
    By Unica in forum Excel General
    Replies: 0
    Last Post: 11-30-2010, 03:52 AM
  7. Pivot Table Calculation Field Incorrect
    By alski in forum Excel General
    Replies: 1
    Last Post: 07-09-2009, 10:10 PM
  8. pivot table data field calculation question
    By sbishops in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-30-2008, 03:15 PM

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