+ Reply to Thread
Results 1 to 12 of 12

Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Dear Forum,

    I need to get the Average of the Counts used in my Pivot Table, I have three Column Data
    1. Col A- Branch - Name of the Branches
    2. Col B- File No - Actual File Nos
    3. Col C- Month- Contains Apr-19,May-19,Jun-19 and Jul-19

    Now I have the Branch in my Row Section of the Pivot table, the Month in the Column Section and the File No in the Data Values where I am taking the Count.
    I get the Grand Total by default, however I need to get the Average of the Counts of File Nos of the months in consideration.
    I managed to do somehow using a Calculated Item however I have to manually add all the items of the months , I need a mechanism where the months get added automatically each month once the data increases every month as this is Year-To-Date Data.

    In my workaround, I have created a Calculated Item to get the Grand Average of Counts and also the Grand Total , however it does not include any new months added in the data as I need to manually add it to the items, so is there a workaround without using any helper Columns in the data as i need to get this as a ready-made structure in the Pivot Table.

    I can always do the Average Calculation next to my Pivot table however I need it as a part of the Pivot table.

    Warm Regards
    e4excel
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Hi,

    Please check the attached.
    Changed the layout of your Pivot and created a new one.

    Best Regards/VKS
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Thanks VKS for the help, however I was wanting to understand without using any Helper Columns whether achieving the requirement was possible or not?. I also need the Grand Total of Counts Columnwise and not the Average.
    In your approach , I dont need the Average Total for Columns

  4. #4
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    I have used the Calculated Item but I had to manually insert each item is there a way of overcoming that ?

  5. #5
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Bump a THread

  6. #6
    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,903

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Not if you only have 2007. Power Pivot would make this possible.
    Rory

  7. #7
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Thanks a lot for the reply, can you help me with the way, I have 2010 Excel at home

  8. #8
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Bump a Thread

  9. #9
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Is there a solution to this ?
    Bump a Thread

  10. #10
    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,903

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    It's a little tricky given that you want the grand total sum as well as the overall average, so you need two parts.

    First load the source data into a linked table in the PowerPivot tab. Then create a pivot table from it and create two measures:
    1. A simple file count (called FileCount) using:
    =COUNTA(Table1[File No])
    2. An average measure using something like:
    =AVERAGEX(values(Table1[Month]),[FileCount])
    Adding these to your pivot table will basically create two columns for each month, so we now need to remove the monthly averages (since they're the same as the counts) by creating a set. However, in order to make sure that any new months automatically appear in the set, we actually need to use some MDX - namely:

    {([Table1].[Month].AllMembers,[Measures].[FileCount]),([Table1].[Month].[All],[Measures].[AverageCount])}

    (the first part shows the file count for all the available months, and the second part only show the average for all months combined)

    I've done that in the attached version of your file.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Wow Rorya,

    This is exactly what I was looking for but I am not able to follow how to decipher it...I just started using Calculated Fields but never used Measures so where do I see what you have done exactly to arrive at this wonderful result...
    I mean I am unable to understand this Pivot Table it looks very different than the commonly used Pivot Tables..

    Please explain and then I am done ...I really grateful for your help ...
    God Bless You...I would like to do each and every step to get into my system to use it more frequently..

  12. #12
    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,903

    Re: Getting a Grand Average of Counts in a Pivot Table next to the default Grand Total

    Make your data into a Table. Load the Power Pivot add-in. Then follow the steps I outlined above to link the table to the data model and create a pivot table from it. You can then right click the table name in the Field list for the pivot table and choose Add Measure to create the two measures needed. Use the Fields, Items and Sets button on the Pivot Table tools tab to create the column Set.

+ 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. [SOLVED] Pivot Table Grand total issue need two grand totals
    By alesha711 in forum Excel Charting & Pivots
    Replies: 18
    Last Post: 02-13-2019, 03:02 PM
  2. Pivot Table Grand Total Average
    By temexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2014, 02:32 PM
  3. Pivot Table, Need Grand Total as an average
    By children in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-13-2014, 01:37 PM
  4. [SOLVED] Is it possible to have both Grand Total and Grand Average in a Pivot Table?
    By ANS in forum Excel Charting & Pivots
    Replies: 15
    Last Post: 10-16-2012, 05:15 AM
  5. Pivot Table Grand Total on Average
    By kmlloyd in forum Excel General
    Replies: 0
    Last Post: 03-16-2011, 12:21 PM
  6. Grand Average of counts in pivot table
    By ruchi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-20-2009, 06:55 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