+ Reply to Thread
Results 1 to 12 of 12

Filters applied to creat a percentage pie chart.

  1. #1
    Registered User
    Join Date
    07-09-2010
    Location
    Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    10

    Filters applied to creat a percentage pie chart.

    Hi,

    I have a spreadsheet with answers - Excellent, Good, Average, Poor etc which can also be filtered by month which is another column. I would like to calculate forexample the percentage of each answer in a pie chart when needed.

    So forexample in colum I will filter for month of May, and then I want in a pie chart to see precentage of answer that are good, percentage of excellent etc. Can this be done easily enough?

    If it take a lot of complicated forumlas to do each time can you configure a macro or something like that because this spreadsheet will be going to a novice user when it is created?

    Thank you in advance.
    Last edited by mark_sheffield; 07-09-2010 at 09:10 AM.

  2. #2
    Registered User
    Join Date
    07-09-2010
    Location
    Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Filters applied to creat a percentage pie chart.

    I have attached my spreadsheet to show you what I mean.
    Attached Files Attached Files

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Filters applied to creat a percentage pie chart.

    You will need a formula for each slice in the pie.
    As you are filtering data you will need to use the SUBTOTAL formula

    Or you could create a pivot table/chart
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    07-09-2010
    Location
    Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Filters applied to creat a percentage pie chart.

    Quote Originally Posted by Andy Pope View Post
    You will need a formula for each slice in the pie.
    As you are filtering data you will need to use the SUBTOTAL formula

    Or you could create a pivot table/chart
    OK, I have never used a Pivot Table before so i will have a look in to that. Any other suggetsions would be helpful though.

    Thanks

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Filters applied to creat a percentage pie chart.

    Actually you data layout is all wrong for pivot tables.

    See attached it uses formula to produce a summary table on the visible rows.
    The chart plots 1 of the Q's which you can select in B1.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-09-2010
    Location
    Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Filters applied to creat a percentage pie chart.

    Quote Originally Posted by Andy Pope View Post
    Actually you data layout is all wrong for pivot tables.

    See attached it uses formula to produce a summary table on the visible rows.
    The chart plots 1 of the Q's which you can select in B1.
    That looks great although I haven't a clue how you have done it.

    The chart takes in to account everything in the table, B1 doesn't seem to do anything, its always all of the questions. Is there a little tweak I need to do for this.

    But I thank you very much, my colleague will be very happy with this I think.

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Filters applied to creat a percentage pie chart.

    My bad!. All formula where testing first question.

    Replace formula in G2 then fill across and down

    =SUMPRODUCT((G$14:G$25=$F2)*($M$14:$M$25))/SUM($M$14:$M$25)

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Filters applied to creat a percentage pie chart.

    there is a small problem the cell references have been fixed in g2 so all columns refer to q1.1
    needs to change to
    =SUMPRODUCT((G$14:G$25=$F2)*($M$14:$M$25))/SUM($M$14:$M$25) dragged across and down that is why b1 isnt doing anything obvious
    oh i see andy has spotted it as well!!!1
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  9. #9
    Registered User
    Join Date
    07-09-2010
    Location
    Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Filters applied to creat a percentage pie chart.

    Quote Originally Posted by Andy Pope View Post
    My bad!. All formula where testing first question.

    Replace formula in G2 then fill across and down

    =SUMPRODUCT((G$14:G$25=$F2)*($M$14:$M$25))/SUM($M$14:$M$25)
    Outstanding- Thank you ever so much!

  10. #10
    Registered User
    Join Date
    07-09-2010
    Location
    Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Filters applied to creat a percentage pie chart.

    Any ideas why I would get values like 208%, 167% etc?
    Attached Files Attached Files

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Filters applied to creat a percentage pie chart.

    cause the G still has a $ infront making it a absolute reference.

  12. #12
    Registered User
    Join Date
    07-09-2010
    Location
    Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Filters applied to creat a percentage pie chart.

    Quote Originally Posted by Andy Pope View Post
    cause the G still has a $ infront making it a absolute reference.
    my bad - thanks

+ 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