+ Reply to Thread
Results 1 to 5 of 5

Weighted Average in a Pivot Table

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Dayton, NJ
    MS-Off Ver
    2010
    Posts
    3

    Weighted Average in a Pivot Table

    Hello everyone,

    This is my first posting.

    I have a table with Part #, Received qty, Merchant code, Received date, PO date, Product type & Lead time.

    Received date - PO date will give me the lead time per row and when I do the pivot table for the entire data, I am able to get the average lead time per merchant, per product type. Is there a way to get the weighted average lead time per merchant, per product type? Please let me know.

    Please see attached data.
    Attached Files Attached Files

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Weighted Average in a Pivot Table

    if I understand correctly add a new field in your source data that multiplies the lead time by qty. then create a calculated field in the pt that divides that new field by the qty field
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    04-23-2013
    Location
    Dayton, NJ
    MS-Off Ver
    2010
    Posts
    3

    Re: Weighted Average in a Pivot Table

    Thank you so much. It worked perfectly.

    Sorry to ask you, could you please explain the logic behind the steps you mentioned above? I feel so dumb!!

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Weighted Average in a Pivot Table

    the calc is sum(qty*lead time)/sum(lead time) for the weighted average. if you try and build that just using a calculated field the calculation you get is actually sum(qty)*sum(lead time)/sum(qty) which of course is just sum(lead time) so you need to add the weighting multiplication to the source data

  5. #5
    Registered User
    Join Date
    04-23-2013
    Location
    Dayton, NJ
    MS-Off Ver
    2010
    Posts
    3

    Re: Weighted Average in a Pivot Table

    Got it!! Thank you so much for your time. I really appreciate it!!

+ 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