+ Reply to Thread
Results 1 to 12 of 12

Summarizing for Pivot Table

  1. #1
    Registered User
    Join Date
    10-14-2011
    Location
    Missouri
    MS-Off Ver
    Excel 2010
    Posts
    12

    Summarizing for Pivot Table

    Among other columns, I have a worksheet with Username and Hours. What is the best way to summarize Hours by Username for a Pivot Table? Thanks for any help!!
    Last edited by Mase1; 10-17-2011 at 04:14 PM.

  2. #2
    Registered User
    Join Date
    10-14-2011
    Location
    Missouri
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Summarizing for Pivot Table

    I created a sample of the worksheet, and uploaded it if anyone has time to take a look.
    Attached Files Attached Files

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Summarizing for Pivot Table

    ID in Rows, Hours in Values?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    10-14-2011
    Location
    Missouri
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Summarizing for Pivot Table

    The ID is more of an instance marker - A unique ID is given per submission. So I would be summarizing per username, and hours would be the value. I hope I'm not misunderstanding your question! Thanks for taking a look.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summarizing for Pivot Table

    See attached.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  6. #6
    Registered User
    Join Date
    10-14-2011
    Location
    Missouri
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Summarizing for Pivot Table

    Quote Originally Posted by NBVC View Post
    See attached.
    I apologize - I should have given more explanation of what my aim is. I'm trying to get the average number of hours per student. Since Excel doesn't support a unique count in pivot tables, I'm not sure how to summarize hours by username (I'm guessing that's the best thing to do) in order to get this figure.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summarizing for Pivot Table

    You can change sum to average by right-clicking the Sum of Hours Column and selecting Value Field Settings.

  8. #8
    Registered User
    Join Date
    10-14-2011
    Location
    Missouri
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Summarizing for Pivot Table

    Quote Originally Posted by NBVC View Post
    You can change sum to average by right-clicking the Sum of Hours Column and selecting Value Field Settings.
    But that will only give me the number of hours per instance of submission. In other words, if there are 5 submissions from 3 students totaling to 15 hours, it would calculate the average on 5 submissions instead of 3 students. I can get the average per submission, but I can't get the average per student. I hope this helps clarify a little, and thanks again for you on-going help!

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summarizing for Pivot Table

    What are the expected results for the sample workbook you posted?

  10. #10
    Registered User
    Join Date
    10-14-2011
    Location
    Missouri
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Summarizing for Pivot Table

    Quote Originally Posted by NBVC View Post
    What are the expected results for the sample workbook you posted?
    I tweaked the sheet some and re-uploaded to give a clearer example.

    Pivot Table
    Column Label = Category
    Row Label = School
    Values = Average of Hours

    This shows an average amount of "Service" hours for Kirksville College of Osteopathic Medicine" as 11. On the sheet, 2 usernames logged 3 instances of service (8 hours, 12 hours, and 13 hours). So what the pivot does is add the amount of hours (33) and divide it by the number of instances (3), which gives 11. However, I would like to be able to also get the average per username. Since "Plaird" appears twice in the "Service" category for a total of 25 hours, and Jnair appears once in the "Service"category for a total of 8 hours, the average would be 16.5 (33 divided by 2).
    Attached Files Attached Files

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Summarizing for Pivot Table

    I added another column to the database, column U with formula in U2:

    =IF(COUNTIFS(B$2:B2,B2,L$2:L2,L2)=1,SUMIFS($R$2:$R$9,$B$2:$B$9,B2,$L$2:$L$9,L2),"")

    copied down.

    I included the column in the Pivot Table and got the attached.

    You can reorganize it the way you want...
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    10-14-2011
    Location
    Missouri
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Summarizing for Pivot Table

    Excellent! Thank you VERY much for the help...

+ 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