# Grouping in pivot table



## dee5782 (Apr 19, 2007)

Is there a way to "check" several categories in a pivot table column and have them all be grouped together in one column instead of 3 or four columns? i.e. i've got a date field in the "row", and an Name field and Type field in the "column", and the raw data in the "data" field. I'd like to only check several of the "names" and have them all appear under the same column or group with the corresponding "type" field next to them. Is there a way to do this? Hope this wasn't to hard to understand - thanks in advance for your help.


----------



## slurpee55 (Oct 20, 2004)

If I understand you, you have data that looks a bit like:
Date	Name	Type
Date 1 a 1
Date 2 b 2
Date 3 c 1
Date 4 a 1
Date 5 c 3
Date 6 a 2
It is certainly possible to show your data in a pivot table like this:
(see pic)


----------



## dee5782 (Apr 19, 2007)

Thanks for the reply! This almost works, but i need the "date field" to be in the rows, instead of the page, so that i can have a row for each month. Right now, i've got it set up like that (date field as a row) and then have a name field and a type field in the columns. If I move the date field to the page and the name field to the row, i gain the ability to check several different names, however, i lose each month and just have an aggregate total. The reason i ask is because i've got a pivot chart working from this pivot table, and i want to have just two data series, one for each of the different type fields (deposit or order). Again, thanks for your reply.


----------



## slurpee55 (Oct 20, 2004)

Is this more what you want? (based on the same data as before)


----------



## dee5782 (Apr 19, 2007)

See attachment. Can i add another "expr1" number but have it all group together and stay in the same format, without it adding columns for the new "expr1" number? I want to be able to make a chart for more than one "expr1" number, but only have two lines, one for deposits and one for orders.


----------



## slurpee55 (Oct 20, 2004)

What does the expression represent? Are you pulling some other data together there or...? (Also, bitmaps get compressed pretty small - for an old man's sake, make the next screenshot a jpg - thanks!)


----------



## dee5782 (Apr 19, 2007)

The expression is simply an "id" field. But there are times when I want to group several id's together, but still have the data in the deposits and orders field stay in the same column. See below for an example of my raw data. Sorry about the bitmap! That was tiny!

Expr1 Date Type Totals 
23213 4/1/2005 Dep 5133.24
32155 2/3/2006 Ord 42123
351531 5/31/2006 Dep 55223.45
365151 6/4/2007 Dep 3511.14
54545 4/31/2005 Ord 45113 
31533 3/24/2006 Ord 83511.84


----------



## slurpee55 (Oct 20, 2004)

Well, based on your data there, I came up with this. As you can see, Expression, Type, Totals and Date all have filters, so you can select only some or all of the data (for instance, just the April data).


----------



## dee5782 (Apr 19, 2007)

The only problem is that i can't graph the deposits and orders for the "expr1" selected by month. So, i guess the real issue, is being able to select multiple numbers in the "expr1" field, but have all data list out in only two columns, the deposit and order columns. (see previous attachment). The attachment i've posted to this reply shows the pivotchart that i'm currently using, but if i choose more than one number, then of course, i will get more lines, depending on the amount of selections chosen.


----------



## slurpee55 (Oct 20, 2004)

I'll be honest, I've tried and tried and can't figure out a way to show what you are asking, although it probably can (heck, I like your current chart better than most of what I came up with). Let me check in with someone else and see if he can join here.


----------



## dee5782 (Apr 19, 2007)

I've been trying everything and can't seem to get it to work. Maybe it just can't be done, like you said. Oh well, I appreciate all of your help and let me know if you find out anything. Thanks again!


----------



## harish (Feb 12, 2007)

Sir,

You need to plot an extra field (expr1) separately in another (chart) is what I understand with the discussion that i have read.

If you can give me an idea of what exactly you want to do I will get back with the exact solution (Only dummy data required). If possible send handmade/scanned bitmap of output required.

Harish Swamy


----------



## dee5782 (Apr 19, 2007)

What i would like to do is select multiple numbers from the "Expr1" field, but have all data show up in only two columns - deposit and order. That way, when I run a pivot chart off the pivot table, i will only have two lines. See the attachments. The 1st attachment (untitled3) shows the pivot table with only 1 number selected, however, it is in the correct format which i need to graph. The second attachment (untitled 1) shows the pivot table when two numbers are selected. Of course, under this scenario, I will have 4 lines on the graph. I need to be able to select multiple numbers, but have the pivot table group it together in only two columns. Is this possible? Thanks for offering your help!


----------



## slurpee55 (Oct 20, 2004)

If you look at my last jpg, if you have the dates as the row rather than the column and have Expr1 as the column it might work, or you could have Expr1 as the Page and that would allow you to filter that way.


----------



## dee5782 (Apr 19, 2007)

Unfortunately, putting Expr1 in the Page field does not allow you to check multiple selections. Also, if you have the date field in the column, you will get a seperate line for each month. I need to still be able to have the dates on the x-axis and only have a line for deposits and orders. See previous chart.


----------



## slurpee55 (Oct 20, 2004)

Bummer. Well, I really don't think you can do it, unless some whiz proves me wrong (I hope they do - I would like to see how to do this)!


----------



## harish (Feb 12, 2007)

Sir,

Send attachement (the Excel Sheet) not screen capture.

Harish Swamy


----------



## dee5782 (Apr 19, 2007)

As you can see in the attachment, i've got the pivot chart based off of only one selection. Can i add another selection from "expr1", have it sum the data together by month and still have only the two lines for deposit and order? I've condensed the file for easier navigation.


----------

