+ Reply to Thread
Results 1 to 12 of 12

Creat grouping count values in Pivot Chart

  1. #1
    Registered User
    Join Date
    08-06-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    20

    Creat grouping count values in Pivot Chart

    Here is a picture of what I'm looking at so the question makes more sense:

    As you can see, there are too many values for the pie chart to display individually by country. So what I would like to do for the pie chart is to group by values, so 1-2, 2.01-3, 3.01-4, 4.01-5. Then I would like a count of how many counties there are in each group. I have tried several approaches but so far no luck. Any suggestions? Thank you
    Last edited by timko92; 04-13-2014 at 03:56 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Creat grouping count values in Pivot Chart

    What you could try is :
    1. right click on the values and choose sort smallest to largest
    2. after the sort, select all country names between 1-2 and right click on the selection and choose group
    3. repeat step 2 for various value groupings
    4. collapse the groups and the chart will look less "busy"
    Regards,
    Rudi

  3. #3
    Registered User
    Join Date
    08-06-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    20

    Re: Creat grouping count values in Pivot Chart

    Thank you. That is a good alternative I will try for now. But ideally, and I might be asking for too much here, I would like the series for those ranges I mentioned be on the pie chart if that makes any sense.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Creat grouping count values in Pivot Chart

    Tim, please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)

    I know you were just showing your pradicament, but did you see how small that was anyway?

    Having said that, if you want to count within "ranges" take a look at the countifS() function
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    08-06-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    20

    Re: Creat grouping count values in Pivot Chart

    Gotcha. Would you suggest making use of the countif function by making calculated fields within the pivot table with that function, or to just use separate cells for that and make a graph off of those cells?

  6. #6
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Creat grouping count values in Pivot Chart

    I'm not sure if I understand you, but you can collapse and expand the groups to determine the detail to display on the chart. Collapse down all the groups and expand only one group, etc...

    Also note that I'm not sure if you WILL be able to effectively fit ALL that data onto a pie and expect to see legible output. A pie is just not equipped to handle that volume of data.

  7. #7
    Registered User
    Join Date
    08-06-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    20

    Re: Creat grouping count values in Pivot Chart

    Hey Rudi,

    I think FDibbins answered my question. But I know that a pie chart can't handle all that data, and so what I'm trying to achieve is to have ranges for number values, and have each part of the pie chart be a representation how many nations fall into each range. In other words, what percentage of nations falls in the 1-2 category for example. There would be no specific nations if that makes any sense.

  8. #8
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Creat grouping count values in Pivot Chart

    OK... Experiment with the COUNTIF() function.
    If you need further assistance, upload a sample workbook and some dummy data so we can help see that you need.

    Cheers

  9. #9
    Registered User
    Join Date
    08-06-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    20

    Re: Creat grouping count values in Pivot Chart

    Thanks guys. While I'm here in this thread, so as not to make another one, I have a question regarding defining to count values between values in countif. In another thread someone said to do =COUNTIF(rng,">x")-COUNTIF(rng,">y"), but all this does is subtracts the one count from another.

    Never mind, figured it out!

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Creat grouping count values in Pivot Chart

    Happy to help and thanks for the feedback )

    its always a good feeling when you figure it out for yourself

  11. #11
    Registered User
    Join Date
    08-06-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    20

    Re: Creat grouping count values in Pivot Chart

    Quick question though. I got the chart looking like how I wanted it to by just making use of separate cells. Out of curiosity I decided to try to use the countifs function to create a field in the pivot table calculated fields section, and when using the same exact formula for one of my ranges, when I click "Ok", it highlights the first cell of the range I specified, and won't do anything else. Would you be able to explain why that's the case?

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Creat grouping count values in Pivot Chart

    If I want to use a calc for a PT in the manner you want, I always do it in the original data, in a helper, and then use that in the PT

+ 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. grouping values in chart
    By m0rph3us in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 11-19-2012, 05:14 PM
  2. Pivot Table / Chart not grouping same entries
    By bigpee in forum Excel General
    Replies: 4
    Last Post: 02-05-2010, 10:52 AM
  3. Grouping in Pivot Table with varying count of fields
    By Scotch_And_Dry in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2009, 08:11 PM
  4. Grouping data in Pivot chart
    By ChemistB in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-24-2009, 10:53 AM
  5. [SOLVED] Average of Count in Pivot Table with Grouping
    By Ian in forum Excel General
    Replies: 2
    Last Post: 04-02-2005, 11:06 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