+ Reply to Thread
Results 1 to 3 of 3

Average of two columns in pivot table

  1. #1
    Registered User
    Join Date
    11-03-2003
    Location
    NSW Riverina, Australia
    MS-Off Ver
    365
    Posts
    29

    Average of two columns in pivot table

    Posting this for a friend.

    I have data in a pivot table. One column is a sum of data. The other is the average of the data. I want the result of the sum divided by the average. I’m not sure how to construct a formula to do this.

    I am not able to add an attachment of an excel file that shows what I am trying to do. Sorry if this violates rules, but here is a link to the file in my dropbox.

    https://www.dropbox.com/s/irga3mntt7...blem.xlsx?dl=0

    Any help very much appreciated.
    Regards,

    David Obeid

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Average of two columns in pivot table

    Attached is a much scaled-down version of the requirement. Columns A:C are the data. Columns F:H is a pivot table built from the data. So far, everything is normal.

    Then I overlaid a named dynamic range over the results of the first pivot table. Pivot_Data =OFFSET(Sheet1!$F$1,0,0,COUNTA(Sheet1!$F:$F),3)

    For more information on named dynamic ranges, see: Pivot_Data =OFFSET(Sheet1!$F$1,0,0,COUNTA(Sheet1!$F:$F),3).

    Then I used this named range as the data source for the pivot tables in columns J:M. Column M is a calculated field in the pivot table: ='Sum of Value'/'Average of Value2'

    I left the column headers on the first pivot table exactly as they came out.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  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,911

    Re: Average of two columns in pivot table

    Given that you have office 365, you can load the data to the model, then use Power Pivot to create three measures. One is the sum of the Pay field, one is the Average of Weekly Sales and the third is simply the first measure divided by the second.
    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. Pivot table to calculate average based on columns labels
    By Raehan in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-14-2018, 09:56 PM
  2. Replies: 4
    Last Post: 09-26-2017, 12:41 PM
  3. Replies: 7
    Last Post: 02-27-2017, 07:41 AM
  4. Replies: 9
    Last Post: 03-18-2015, 07:16 AM
  5. [SOLVED] Can you get average of two sum total columns in pivot table?
    By batjl9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-01-2014, 07:51 AM
  6. Average in Pivot table
    By lavi in forum Excel General
    Replies: 0
    Last Post: 04-20-2010, 08:41 AM
  7. Pivot Table - Average
    By pr4t3ek in forum Excel General
    Replies: 1
    Last Post: 05-12-2009, 04:10 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