Numbers '08: How would I combine pie chart slices or categories?

Discussion in 'Mac Apps and Mac App Store' started by winninganthem, Aug 2, 2008.

  1. winninganthem macrumors 6502a

    winninganthem

    Joined:
    Jun 10, 2008
    #1
    Hey everyone, I'm new to using Numbers and spreadsheet things, so I was wondering if you could help me with making a chart.

    I have a spreadsheet with several lines of expense data, where each line item falls into one of many expense categories.

    I would like to create a pie chart by expense type (ie, Toiletries, Dining, Cellphone, etc), but Numbers wants to treat each line item as a separate expense, even though many of them share the same name.

    [Please see the attached image for my example]

    Numbers makes the pie chart but puts every individual expense into a separate slice, so I end up getting multiple pie slices that all say "Dining" and so forth. I really just want one pie slice for Dining, one for Cellphone, etc.

    Is there a way to combine pie slices or categories? Or is there a better way to accomplish this?

    Thanks very much in advance :)

    Edit: I realized just now that someone else in another thread is asking how to do this same task, except in Excel. Since this thread is asking how to do it in Numbers, please keep this thread open.
     

    Attached Files:

  2. winninganthem thread starter macrumors 6502a

    winninganthem

    Joined:
    Jun 10, 2008
    #2
    Hey guys, I figured it out so I'll just post it here so hopefully anyone that needs help can benefit from my answer :).


    What I did was that I made a separate table with two columns. Column A for the category, and column B for the total amount.

    In column A I listed out all of the expense categories. In column B, it gets a little trickier.

    Let's say that I have a category called 'Groceries' and I want to know how much I spent on groceries. I don't need to know how much I spent on everything else, just groceries. This is where the SUMIF function comes in. The SUMIF function adds all the numbers you give it if they meet a certain condition that you specify :D.

    The format is =SUMIF(test-range,"Condition”,Sum-range).

    So the function asks you to specify
    1.) What range of data to test
    2.) What standards you are looking for ("the condition")
    3.) and if the standards are met, where are the numbers that you want to add located

    So, I wanted my function to look through the expenses of my original table. Then my function would add up every expense that has the category "Groceries".

    My final code :D :

    =SUMIF(TableName :: Category,"=Groceries”,TableName :: Price)


    So the code runs through the categories of my expenses, checks if the name equals Groceries, and if it does, then it adds the corresponding value to the total.

    Rinse and repeat for the rest of the categories.

    ---

    With the analysis table finished, I selected the whole thing and hit "Charts > Pie Chart". The pie chart came out with all the individual categories. :D
     

    Attached Files:

  3. snberk103 macrumors 603

    Joined:
    Oct 22, 2007
    Location:
    An Island in the Salish Sea
    #3
    Thanks!

    I have nothing constructive to add.... I'm not a SpreadSheet Power User (SSPU).... but this seems to be good and elegant solution. Congratulations!
     
  4. DaveF macrumors 6502a

    Joined:
    Aug 29, 2007
    Location:
    NoVA
    #4
    You found what I think is the most practical solution.

    In Excel you could create a Pivot table, which would automatically sum the categories, and plot that. But Numbers doesn't do Pivot tables.
     
  5. winninganthem thread starter macrumors 6502a

    winninganthem

    Joined:
    Jun 10, 2008
    #5
    Hm, that sounds like Excel would make my life easier haha..

    Shame that Numbers looks so much prettier :p

    Thanks for the feedback :)
     
  6. JCPH macrumors member

    Joined:
    Aug 11, 2007
    Location:
    Tannhäuser Gate
    #6
    I realize this is an old thread, but thank you — this helped a lot.
     

Share This Page