Pivot Tables

Message Bookmarked
Bookmark Removed
Apologies in advance for being such a cone-head on a Saturday night but I am still at work.

Can someone please tell me how to re-format the layout of a Pivot Table?

I can get it to display like this:

Category Detail
Detail
Detail

Category Detail
Detail
Detail

etc etc but I want it to display


Category Detail Detail Detail
Category Detail Detail Detail


Please help me in this moment of mental breakdown through tedium!

Lara (Lara), Saturday, 12 June 2004 18:24 (twenty-two years ago)

Aw Lord, I've just spotted another techie question sent in at half six and no one's answered it. This is a bad scene.

Lara (Lara), Saturday, 12 June 2004 18:28 (twenty-two years ago)

Oh, crikey, if I were on a PC, I could tell you this. I think what you do is put the Category in the left hand column, then put the Detail in the little header field about the data. I'm not explaining that very well, am I?

Possibly Kate Again (kate), Saturday, 12 June 2004 18:31 (twenty-two years ago)

       Detail
________________________________
Category    Contents

(This is not going to format right, I know it.

Possibly Kate Again (kate), Saturday, 12 June 2004 18:33 (twenty-two years ago)

         | Detail
Category | Contents

Possibly Kate Again (kate), Saturday, 12 June 2004 18:37 (twenty-two years ago)

Argh. I hate HTML sometimes.

Possibly Kate Again (kate), Saturday, 12 June 2004 18:37 (twenty-two years ago)

use the pre tag!

Martin Skidmore (Martin Skidmore), Saturday, 12 June 2004 18:38 (twenty-two years ago)

What's the pre tag?

Possibly Kate Again (kate), Saturday, 12 June 2004 18:45 (twenty-two years ago)

You've got:

COLUMN

ROW

DATA

all in pretty (and useless and annoying boxes).

I have category in Row and Details in the Data bit as I want to sum up totals. Can't get sums of data in either Row or Column fields.

There must be a way of doing this?

(Incidentally Kate, how are you logging on without a PC? Have you a fancy phone? Or did you get that ILX chip planted in your brain??!)

Lara (Lara), Saturday, 12 June 2004 18:50 (twenty-two years ago)

I have a MAC!!!

Possibly Kate Again (kate), Saturday, 12 June 2004 18:51 (twenty-two years ago)

There is actually excel on this Mac, though, let me look.

Possibly Kate Again (kate), Saturday, 12 June 2004 18:52 (twenty-two years ago)

I was going to make a lame joke about coats but I may just go off and top myself intead. I really appreciate this Kate.

Lara (Lara), Saturday, 12 June 2004 18:53 (twenty-two years ago)

How basic instructions do you want? Forgive me if this is too little or too much...

You drop your category by which you want to total into either the row or the column. If you want subtotals by different categories, you can put a category in each.

Put what it is you want to count or total or work with into the Data bit. You can double/right click on it to specify exactly what you want to do - make it a count, a total, a percent or whatever.

Possibly Kate Again (kate), Saturday, 12 June 2004 18:59 (twenty-two years ago)

Yeah no, I get that.

What I have is this:
Person
Lara Sum Apples 5
Sum Pears 4

Kate Sum Apples 6
Sum Pears 3

What I want is this:

Person Sum of Apples Sum of Pears
Lara 5 4

Kate 6 3

Currently I have Person in ROW and Sum of Apples and Sum of Pears in Data. Where should I have them to get the layout I want?

Lara (Lara), Saturday, 12 June 2004 19:05 (twenty-two years ago)

Let me stick that in my spreadsheet, and I'll get back to you in a minute! (ha ha, I have Hipsters and Geeks in my spreadsheet, apples and pears is much nicer.)

Possibly Kate Again (kate), Saturday, 12 June 2004 19:09 (twenty-two years ago)

Assuming your data looks something like this:

Person Detail
Kate Apple
Kate Apple
Kate Apple
Kate Apple
Kate Apple
Kate Pear
Kate Pear
Kate Pear
Kate Pear
Lara Apple
Lara Apple
Lara Apple
Lara Apple
Lara Apple
Lara Apple
Lara Pear
Lara Pear
Lara Pear

Put "person" into ROW put "detail" into COLUMN then put "count of data" into DATA

And you should get
Person - Apples - Pears - Grand Total (per person)
Kate - 5 - 4 - 9
Lara - 6 - 3 - 9
Grand Total (per fruit) - 11 - 7 - 18

Am I getting warmer? Or if your data is formatted differently, let me know and I'll work it out from there.

Possibly Kate Again (kate), Saturday, 12 June 2004 19:18 (twenty-two years ago)

(the pre tag treats text as pre-formatted. Since we type in some courier-style non-proportional font, using pre keeps things in line, whereas the proportional times font in a posting as it then appears loses that alignment.)

Martin Skidmore (Martin Skidmore), Saturday, 12 June 2004 20:12 (twenty-two years ago)

My data looks like this though:

Person Apple Pear Banana Lithium Spray
Lara 5 4 5 3
Kate 6 3 2 2

etc etc.

I am too square (and tired) to go the hipster/geek way.

I will have another play in the office tomorrow. Kate, thank you so much for your help. You've kept me sane. Any more words of wisdom related to the my data layout very much appreciated.

Lara (Lara), Saturday, 12 June 2004 21:12 (twenty-two years ago)

That came out weird. Anyway, tried another couple of options and turned out what looks like the cover of my next album - funky fruits!

Can it be done ladies and gentlemen? Can it be done?

Lara (Lara), Saturday, 12 June 2004 21:20 (twenty-two years ago)

What I have is this:
Person
Lara Sum Apples 5
Sum Pears 4
Kate Sum Apples 6
Sum Pears 3

Get it back so it looks like that. Here's something which seems to work for me, but I don't know why and I don't know what I'm doing, so I can't guarantee it'll help:
- go to the PivotTable toolbar (if it's hidden then right-click anywhere on your PivotTable and select Show PivotTable toolbar)
- press the http://www.briarcliff.edu/cis/Excel/009-Pivot-Tables_files/image010.jpg Format Report button
- choose any of the first few AutoFormat report styles (Report 1 is fine)
- don't panic about the garish colours, they'll go away in a minute (I hope. If not, you can undo all of it)
- go back to the http://www.briarcliff.edu/cis/Excel/009-Pivot-Tables_files/image010.jpg Format Report button, scroll down to the bottom of the list and choose PivotTable Classic

I don't know why this does what it does or why you have to set it to Report 1 and not go straight to PivotTable Classic, I don't know whether there's an easier way (but there must be), and I don't know if it'll work for you, but it works for me.

passing lurker, Saturday, 12 June 2004 22:04 (twenty-two years ago)

Ah, OK, I see the way yer data is formatted now. I'm too used to spreadsheets that are directly downloaded database data. I'll have another twiddle when I've had some tea and woken up a bit.

Possibly Kate Again (kate), Sunday, 13 June 2004 05:54 (twenty-two years ago)

OK, I see what you mean now. There are two ways to go about this.

The first question is, in this case, are you sure that what you want is a Pivot Table? Your data already contains totals per person, so it might be easier to put a manual sum of all fruit at the bottom of every column? That is, if all you want is the totals.

If you want to do charts and graphs off your pivot table, then reverse your axises. (Axes?) It won't *look* exactly the way you want it (unless you tilt your head) but it will behave the way you want it to.

Your layout would be "person" in COLUMN and DATA would have "sum of apples" and "sum of pears".

The table will be the wrong way around, but what you will have is:

data - Kate - Lara - Grand Total
Sum of Apple - 5 - 3 - 11
Sum of Pear - 4 - 3 - 7

(I'm just trying to figure out why it won't give totals per person that way - probably because there is nothing in the ROW field. Grrr, if I were doing this on a PC, I would know all the right clicks to get at it, but I can't seem to find them on this Mac.)

Possibly Kate Again (kate), Sunday, 13 June 2004 07:41 (twenty-two years ago)

Wow, I'm flummoxed on this one. I can't get those column totals to come in with nothing in the ROW field.

Possibly Kate Again (kate), Sunday, 13 June 2004 07:49 (twenty-two years ago)

This is mental isn't it. The problem I have is that I have 800 odd categories and three data element that I want to display (all sums of data in a spreadsheet).

So listing the caregories across the columns is not an option. Similarly if I have the categories in the Rows, I get three rows per category (one for each sum) so I have approx 2,400 rows, which is huge. I need to be able to display the data in a more efficient manner.

Beyond using a pivot table, what else would you suggest?

The data is like this to be honest

Category Pear Apple Banana Fruit ID

Lara 4 3 7 A
Kate 1 3 8 B
Kate 4 6 7 C
Lara 7 4 6 D

So because each category (i.e. Lara or Kate has a unique Fruit ID or whatever) I thought using a Pivot Table was the best way of displaying the data. Perhaps Pivot Tables weren't invented to look pretty?

Lara (Lara), Sunday, 13 June 2004 07:57 (twenty-two years ago)

Oh my god, your data requirements get more complex each time I look at them! No, in this case, if you have more than one entry for each Unique ID (person would be your Unique ID) then you want to pretty it up with a pivot table. I'm thinking the Fruit ID will be useful.

Let me have a go - this is really good procrastination material, because I feel like I'm actually learning good job skills instead of just mucking about on the internet.

Possibly Kate Again (kate), Sunday, 13 June 2004 08:00 (twenty-two years ago)

Duh, Fruit ID would be your unique ID. Need more tea!

Possibly Kate Again (kate), Sunday, 13 June 2004 08:02 (twenty-two years ago)

What I mean to say is this - you have more than one entry per category, therefore your unique ID will be useful. probably. I'm better with actually doing the maths than I am explaining what I'm doing! Argh!

Possibly Kate Again (kate), Sunday, 13 June 2004 08:04 (twenty-two years ago)

Crikey. I *have* actually done this before, and I'm trying to remember how we actually did it. I can't remember if I did a pivot table off a pivot table (sounds mad but sometimes it works) or if I used some other kind of summary tool.

Possibly Kate Again (kate), Sunday, 13 June 2004 08:10 (twenty-two years ago)

Wait! yes! that might be it! Running subtotals, and then hide the data. You'd have to sort your data by category first, but it might work...

Possibly Kate Again (kate), Sunday, 13 June 2004 08:11 (twenty-two years ago)

Yes! yes, yes, yes! You don't want a pivot table, you want auto-subtotalling.

Sort all your data by category. From your Data menu, select Subtotals. At each change in "category", use function "sum". Add subtotal to, select "apple" and "pear" and "banana" and deselect the others. Say "Yes" to replace current subtotals, and click "summary below data" for a nice summing up bit at the bottom.

Now you will have even more rows than you had before, but panic not. In the left hand column which has now appeared next to your data, click the little minus signs to hide the data and leave your subtotals. (Level 2 is the one you want to hide - if you click Level 1, all your data will disappear except your grand totals!)

Possibly Kate Again (kate), Sunday, 13 June 2004 08:18 (twenty-two years ago)

I've now got:

Category - apple - pear - banana
Kate Total - 8 - 9 - 14
Lara Total - 8 - 7 - 14
Grand Total - 16 - 16 - 28

Possibly Kate Again (kate), Sunday, 13 June 2004 08:23 (twenty-two years ago)

lara you work too hard! ;-)

Julio Desouza (jdesouza), Sunday, 13 June 2004 09:52 (twenty-two years ago)


You must be logged in to post. Please either login here, or if you are not registered, you may register here.