+ Reply to Thread
Results 1 to 2 of 2

making a weighted average in a pivot table

  1. #1
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    147

    making a weighted average in a pivot table

    I am trying to calculate a weighted average of "orders per hour" using a pivot table.

    Currently my pivot table is calculating the "average" of "orders per hour" from my source data which to keep things simple has this structure:

    Columns:
    A - Employee name
    B - Hours worked
    C - Orders
    D - Returns
    E - Orders/Hr (formula: C divided by B)
    F - Returns/Hr (formula: D / B)
    G - Date

    Now if an employee takes only orders for a shift he/she will have a single row entered for each day worked. Likewise if an employee only takes returns that day he/she will have a single row for the returns. Unless they work partial shift the hours worked defaults to 8.

    However, if an employee takes both Orders and Returns in a single day he/she will have two rows inserted to the table, one row for each activity with the hours split between the two rows based on how much time was spent.

    Now if I were to add a calculated field to my pivot table and take "orders / hours" then I would not get a true average because ALL the hours would be included in the denominator, not just those hours associated with the rows that had orders in them. Therefore I just take the average of column E in my pivot table which doesn't give me a weighted average.

    Any ideas on how to get a weighted average to appear in my pivot table?

  2. #2
    Registered User
    Join Date
    06-10-2005
    Posts
    12
    Go to this link. It helped me.

    http://exceltips.vitalnews.com/Pages...ivotTable.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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