+ Reply to Thread
Results 1 to 3 of 3

Using HARMEAN (Harmonic Mean) In A Pivot Table - Is It Possible?

  1. #1
    Registered User
    Join Date
    03-06-2015
    Location
    London
    MS-Off Ver
    Mac Office
    Posts
    45

    Using HARMEAN (Harmonic Mean) In A Pivot Table - Is It Possible?

    Hi,

    I have some huge files I'm working with and only just got my head around pivot tables which has been amazing. The only issue I'm having is I need to get the harmonic mean in one column but I can only see a way to display values as an average which I assume is just normal mean? Is there a way to get a harmonic mean / HARMEAN function in the pivot table?

    Thanks
    Alex

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

    Re: Using HARMEAN (Harmonic Mean) In A Pivot Table - Is It Possible?

    I think what you are going to have to do is use a helper column in the source data to get the Harmonic Mean. This might even require an array formula to group it by value or by date. This column will display the Harmonic Mean against each of the values to be tabulated by the pivot table.

    So if you had 4 items in the mean, the pivot table would want to sum them and you would get an answer 4 times bigger than you want. Use Average instead. Since each of the HMs in the 4 items are the same, the average will be the same as any one of them.

    Here is a formula that might help:
    Please Login or Register  to view this content.
    In your case, Function is HARMEAN, Lookup Range is the range containing the date or item you want to group on. Lookup Value is the specific value of the date or item (usually a cell on the row with the formula) and Value Range is what goes into the Harmonic Mean. So it might look something like

    =HARMEAN(IF($A$2:$A$100="Item 1",IF (NOT(ISBLANK($B$2:$B$100)),$B$2:$B$100,False)))

    This would be entered as an array formula (CTRL-SHIFT-ENTER).

    Each row in the helper cell will compute the HM for all values in Column B where Item 1 appears in Column A
    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
    Registered User
    Join Date
    03-06-2015
    Location
    London
    MS-Off Ver
    Mac Office
    Posts
    45

    Re: Using HARMEAN (Harmonic Mean) In A Pivot Table - Is It Possible?

    Thanks for the help! Tried that formula on a small sample and definitely works. My fear is that Excel may struggle to manage it on my sheets (with tables) as each one is about 800,000 rows. Let's see! If not will just make do with mean average on pivot table as it is easy and quick to do with large data sets.

+ 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. Automating Pivot table and pivot chart creation if data table names unknown
    By Vegiepie2016 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-04-2016, 11:52 AM
  2. Replies: 1
    Last Post: 07-29-2015, 05:19 PM
  3. Replies: 1
    Last Post: 07-29-2015, 05:15 PM
  4. Harmonic Mean IF
    By aaochsner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-31-2012, 03:09 PM
  5. Double conditioning of harmonic mean??
    By FrederikBjerre in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-01-2012, 08:16 AM
  6. Calculate group harmonic mean and more
    By FrederikBjerre in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-23-2012, 12:11 PM
  7. Weighted harmonic mean?
    By naturallight in forum Excel General
    Replies: 4
    Last Post: 11-30-2009, 01:32 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