A Complete Guide to Pivot Tables 261
A Complete Guide to Pivot Tables: A Visual Approach | |
author | Paul Cornell |
pages | 368 |
publisher | Apress |
rating | 10/10 |
reviewer | Raymond Lodato (rlodato AT yahoo DOT com) |
ISBN | 1590594320 |
summary | A well-researched step-by-step tutorial on the use and programming of Microsoft Excel PivotTables for data analysis. |
If you have any need to analyze data in Excel, you must read this book. I learned so much more about PivotTables after I read it that they are now actually useful, rather than just being something I would occasionally try out. Every chapter is packed with excellent information in an easy-to-follow format. A beginning to intermediate user can understand most of the book; only the chapter on programming PivotTables requires intermediate to advanced knowledge to fully comprehend.
Cornell takes a tutorial approach to explaining what PivotTables are, what they are capable of doing, and how you can apply them to your needs. Each chapter in the Complete Guide gives you an overview of a single topic, a series of step-by-step examples, a Try-It section for more practice, and a summary of next steps. The book was written for Excel 2003, but most of the techniques can be applied to Excel 2002 and even Excel 2000.
When you read this book, I would recommend that you sit at your computer to try these techniques as you read them. I tried to just read the book at first, but you really get itchy to try each feature out. Take it in sequence, as there is a definite building from one chapter to the next.
Chapter 1 gives you an overview of the PivotTable feature, what it's meant to do, and why you would use it. Chapter 2 starts the in-depth training of building basic PivotTables from Excel Lists, external data sources, other PivotTables, etc. It also includes tips on formatting the information and tweaking the fields and table to your liking. Chapter 3 goes even deeper, with information on advanced settings, filters, calculated fields, and other little gems that make analysis easier. These three chapters complete your basic training and lead to chapter 4, "Using PivotTables in the Real World." Paul proceeds to give not just one, but three examples of how PivotTables could be used to provide insight into company operations.
While everything I'd known about PivotTables before picking up this book was covered in the first three chapters, the last three chapters explain additional capabilities that really make Excel valuable for data analysis. Chapter 5 explains PivotCharts, which are simply a graphical representation of the information shown in a PivotTable. Paul goes into detail on the different chart types and how they interact with the underlying PivotTable.
If you need to distill and analyze multidimensional, relational data, PivotTables are up to the task, as chapter 6 will demonstrate. The book describes how you use cube files, OLAP databases, and Microsoft Query to get the data and manipulate it. If you're a really capable programmer, comfortable with VBA, chapter 7 shows you how to work with PivotTable programmatically. There is program after program showing you exactly how to get at the data, massage it, and create the resulting PivotTable.
Finally, there is one appendix that describes the differences between Excel 2000, Excel 2002, and Excel 2003. I was originally reviewing this book while using a computer with Excel 2000. I was delighted to find out that most of the information in the book works exactly as Paul described (although the screen shots didn't match). I did recheck some of the examples on my other machine running Excel 2002, and had no problems at all.
Granted, this book is specifically written for Microsoft Excel. However, OpenOffice, the free competitor from Sun MicroSystems, mimics most of the Microsoft Office suite. How does it compare, you ask? Well, OpenOffice has a similar facility to PivotTables, called DataPilot; however, DataPilot is primitive in comparison. For example, you must select the data to summarize, choose (from the menu bar) Data --> DataPilot --> Start, then drag the fields to the appropriate place in the diagram and click OK. Like Excel, you can freely move the fields between row, column, and data areas, and change the data operation from Sum to Min, Max, or a number of others. Unlike Excel, there isn't much more you can do. You don't have Page fields; you can't sort fields on their data; PivotCharts aren't represented; and there's no programming. If you only want to do simple data analysis in OpenOffice, you can get the basics from chapters 1 and 2 of this book.
You can purchase A Complete Guide to PivotTables: A Visual Approach from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
What IS a pivot table anyway? (Score:5, Insightful)
'something really useful for analyzing data, and really great'
Sorry, sahib, but if you want me to read (let alone purchase) a book about pivot tables, I'm going to need some explanation of what they are first.
I don't pretend that I'm speaking for any number of people here. Perhaps every slashdotter besides me knows what a pivot table is, but the description of the review would seem to imply otherwise.
Could anybody else describe a pivot table?
***********
Heh, heh. Google's first hit for "pivot table tutorial" is already slashdotted.
Re:What IS a pivot table anyway? (Score:5, Informative)
Re:What IS a pivot table anyway? (Score:3, Informative)
Re:What IS a pivot table anyway? (Score:3, Insightful)
I'm just sayin'. .
Re:What IS a pivot table anyway? (Score:2)
Re:What IS a pivot table anyway? (Score:4, Funny)
Re:What IS a pivot table anyway? (Score:2)
Movie trailers tell you the whole shitty story, so we don't have to watch shitty movies. Then movie sales plummet so prices are raised and they compensate with stupid explosions in surround sound and digital video instead of film.
Re:What IS a pivot table anyway? (Score:5, Funny)
Re:What IS a pivot table anyway? (Score:5, Funny)
Re:What IS a pivot table anyway? (Score:2)
Pivot Table History (Score:5, Informative)
Pivot tables were originally developed in Lotus Improv [wikipedia.org], Lotus's incredibly advanced word processor for the NeXT machine. Lotus attempted to develop a new paradigm (can't believe I used that word) for spreadsheet interaction, something more sophisticated that +A1+@sum(B1..B3). Pivot tables were a component of this formulaless spreadsheet.
Improv was, is friggin' amazing.
I suppose this is another example of Microsoft getting credit for company's innovations? [apple.com]
Re:Pivot Table History (Score:2, Insightful)
Well, that pretty much cements it, Microsoft is probably fondling a patent on these at this very moment, waiting to spring forth and attack some open source project, only to have prior art slapped in their faces.
Re:Pivot Table History (Score:3, Insightful)
No, it's a review of a book about a feature of Excel. I see nothing that states or implies that MS invented them, other than a note that the equivalent functionality in OpenOffice isn't as advanced or comprehensive.
True, it says that OO "mimics" many of the features of Office, but it's a fair point - it's often described as a (potential) Office killer...
Re:Pivot Table History (Score:2)
Re:Pivot Table History (Score:2)
Re:Pivot Table History (Score:2)
Re:Pivot Table History (Score:3, Informative)
I'm getting tired of just about every discussion about Microsoft being used as an opportunity by Apple fans to promote their favorite company. Keep that sort of stuff to the Apple groups, please. Whether or not Microsoft copied a feature from Lotus Improv has nothing to do with Apple.
Furthermore, it is stupid for Apple fans to point fingers when it comes to copying: without copying other companies' innov
Re:Pivot Table History (Score:2)
They're a lot older than that -- they're just cross-tabulations with a GUI. SAS "proc tabulate" had these in the 80s (without the GUI).
So what happened to Improv? (Score:2)
Which brings up the suite of office software that was developed for NeXT and which is owned by Sun but which will never see the light of day. IT should port quite easily.
Sigh.
Lighthouse Design? (Score:2)
Which brings up the suite of office software that was developed for NeXT and which is owned by Sun but which will never see the light of day. IT should port quite easily.
PC Expo: Sun buys object developer
Lighthouse Design noted for its OpenStep tools
June 1996
http://sunsite.uakom.sk/sunworldonline/swol-06-19 9 6/swol-06-lighthouse.html [uakom.sk]
Sun steps up acquisition efforts
April 24, 2001
Bungled deal
Jonathan Schwartz, who heads Sun's 63-person acquisitions team, says Sun bungled the purchase of his com
Re:Pivot Table History (Score:2)
Improv wasn't an Apple innovation; Lotus Improv has nothing to do with Apple at all. Improv was a third-party application for NEXTSTEP.
Re:Pivot Table History (Score:2)
Improv was both innovative and unique.
Agreed. Improv was awesome. I got a copy pre-installed on the NeXTstation I bought in 1991. It was a very cool machine, with an awesome OS, amazing development environment... everything about that machine was a decade ahead of its time. And Improv fit right in. Improv was so much fun to use I found myself inventing problems so that I could solve them.
Re:What IS a pivot table anyway? (Score:2)
Perhaps it could just be that if you don't know what it is, the book isn't trying to sell to you. For example, would you expect The Washington Manual Hematology and Oncology Subspecialty Consult [amazon.com] to explain to you what hematology and oncology are?
Re:What IS a pivot table anyway? (Score:3, Interesting)
Besides which, hematology and oncology are not obscure terms, and it is quite easy to find a definition. Pivot Tables, otoh, are a specialized phrase to a specific program (or programs, I guess, given the mentions of the Lotus product above), and even the review itself points out that this is a "
Re:What IS a pivot table anyway? (Score:2)
I raised the possibility that this book wasn't intended for a general audience and no rudeness was intended. The fact that it's posted on the front page of Slashdot doesn't *necessarily* imply that it's a general topic -- though of course it could be. However, you are correct in saying that if it IS intended for everyone that an overview of what pivot tables are would be helpful.
Re:What IS a pivot table anyway? (Score:3, Informative)
First, you've got to have some data to describe. Here's one I'm looking at right now: I've got a table in my Oracle database that lists services doctors performed on given dates, and how much they charged for them.
A conventional report would describe that data one-dimensionally. Total amount of money each doctor charged or total amount of money charged in each date range.
A pivot table (or matrix report, as Oracle Reports calls them) shows the sam
Re:What IS a pivot table anyway? (Score:2)
Re:What IS a pivot table anyway? (Score:2)
You insensitive clod
Re:What IS a pivot table anyway? (Score:2)
Plenty of tutorials about. I'm no expert so I use them.
Quoting from the intro to one [wsi.edu.pl]. "Awk, named after its developers Aho, Weinberger, and Kernighan, is a programming language which permits easy manipulation of structured data and the generation of formatted reports. "
Be careful, you'll never be the same again.
Re:What IS a pivot table anyway? (Score:2)
Re:What IS a pivot table anyway? (Score:3, Informative)
Okay, the format isn't magical, it's just a table. The magic-ish is the interface for changing it, basically, you can drag and drop ("pivot") your data categories (columns) and quickly say: okay, lets sum by widgets. Now by gadgets. Now by widgets that are gadgets.
All this can be done on the SQL command line. But this is one place where drag and drop works better than the command line (and I'm a sworn CLI addict for most
Re:What IS a pivot table anyway? (Score:2)
Re:What IS a pivot table anyway? (Score:3, Informative)
Okay - I'll take a stab at this. I've been using pivot tables rather heavily since being introduced to them in the last 12 months or so. The step up from a pivot table is a full-blown business intelligence (BI) tool.
Pivot tables allow you to "slice-n-dice" your data. Say you have a set of data that contains the following items: Business unit, sales person, sales te
Re:What IS a pivot table anyway? (Score:2)
I take the output of sar -d, pretty it up using PERL so that each line looks the same and the fields are tab separated (each line contains the date/time, partition, and the associated sar output). I then bring it into a spreadsheet using the 'import external data' feature (so I can point it to different files) and see what the relative queue lengths, service times, et.al. of all the disks are relative to each other and across a given time frame. It is very
Re:What IS a pivot table anyway? (Score:3, Informative)
And allows you to choose any subset of the fields of the spreadsheet for display in a mini-spreadsheet, lets you choose any field you want to serve as a "grouping agent" and dynamically updates subtotals for you. Plus, the subtotals and totals field can be changed to a variety of formulae, including Sums, Averages, even just counts. And you can choose whether or not to show every record t
Re:What IS a pivot table anyway? (Score:3, Informative)
You can use a pivot table turn this data points (all data for that point is contained on a row, with the top row giving the header for each column quantity, color, PO, date,) into a table. This way you can have a table fo
Re:What IS a pivot table anyway? (Score:2)
Obviously it's a table with one leg shorter than the other. They're useful for annoying the rest of your family at dinner time.
A simple example of pivot tables (Score:5, Informative)
Using a pivot table I could end up with a matrix that looks like: Now I have the data sorted by continent. If I decide I'm not interested in population but instead in GDP, it is a simple drag and drop operation to get a table like: Basically pivot tables let you explore lists of data very quickly and efficiently. If you deal with lists of data regularly like I do, they are one of the most indespensible features in a spreadsheet. Excel has the best ones I've used but most modern spreadsheets have some version of them.
Re:A simple example of pivot tables (Score:2)
Here's a way to spot a one-dimensional list: if the number of columns is fixed, it's one-dimensional. ("Continent, Country, Population" is fixed; it's not dependent on your data.)
If you introduced a "year" column, then it would be two-dimensional data. China's population in 2003 was different than in 2002. And China's population in 2002 was d
Re:A simple example of pivot tables (Score:2)
I'm aware of that. Please note that I was responding to a question about what pivot tables were so I answered with the simplest possible example. There are obviously MANY more sophisticated things that can be done.
Re:A simple example of pivot tables (Score:3, Informative)
That is funny, because when I seen Finance struggling with pivot tables I can usually take their data, upload it into Oracle, query out the answer they need, and give them the results back for formatting in about 1/4 the time it wou
Re:A simple example of pivot tables (Score:2)
So, I just copied and pasted the whole mess into Access and did what would be a two day collation mess in about
Re:A simple example of pivot tables (Score:2, Interesting)
Thanks sjbe.
So you can use a pivot table to quickly sort and group data. When does it make sense to use a pivot table instead of a simple sql query such as:
SELECT sum(Pop) FROM Country GROUP BY Continent ;
or
SELECT sum(GDP) FROM country GROUP BY Continent ;
Re:What IS a pivot table anyway? (Score:2)
That rocks, everyone. I'm proud of you.
Re:What IS a pivot table anyway? (Score:2)
Re:What IS a pivot table anyway? (Score:2)
select
category,
sum(values)
from categorized_values
group by category
order by category
The "pivoting" refers the ability to quickly change the grouped-by and ordered-by columns.
Now how wrong am I?
Re:What IS a pivot table anyway? (Score:2)
well if its the plot you you are refering to, I'd have to say it would be fair comment referring to it as horror, much of Philip K Dick's work is scary as hell. Probably not suprising considering he was a paranoid schizophrenic genius with a bad speed habit.
I don't know though are Orwell's "1984", or Bradbury's "Farenheit 451" Horror? what is a good definition of horror?
Re:What IS a pivot table anyway? (Score:2)
You're absolutely correct. My problem is when that query you specified takes 15-60 minutes to complete (~300,000 records returned from a 5+ table join, then summarized in VB/FoxPro). The great thing about pivot tables is you can start with fairly raw data and you don't have to use more SQL to collapse it, you just drag fields around. I've been using them a lot in the last couple of days, to check the output of queries against the database to make sure they have the correct joins. Write the data to a CSV fil
Re:What IS a pivot table anyway? (Score:2)
This is /. All you need to know about pivot tables is that they are a feature of a Microsoft tool.
Re:What IS a pivot table anyway? (Score:2)
Re:What IS a pivot table anyway? (Score:2)
The first rule of PivotTables... (Score:5, Funny)
...is you do not tell anybody what PivotTables are.
Re:The Second rule of PivotTables... (Score:2)
Multi-dimensional databases (Score:5, Interesting)
For those who do not understand what multi-dimensional database is, here is how I explain it to myself:
A traditional relational database has two dimensions - rows and columns. Now if you take a table and make a copy of it to separate records by year (e.g. 2004data, 2003data, 2002data, etc.), you get a 3rd dimension. And if you were to take your entire database and make a copy of it to separate it by something else, you now have a 4th dimension. Of course the problem with all this would be inability to tie data in one database to data in another in an easy way.
A multi-dimensional database is something that allows you to add dimensions ad-infinitum _and_ query it in a clean way.
Re:Multi-dimensional databases (Score:3, Insightful)
I don't think that's a good way to look at it.
A relation (a single SQL table, view, query) has rows and columns, yes. But the column headings are fixed. So it's only one-dimensional.
However, this one-dimensional structure is adequate to represent N-dimensional data. (By having a table with a composite primary key of N columns.) It's pointless to "take a table and make a copy of it to separate records by year"; the relational way i
Re:Multi-dimensional databases (Score:2)
I'm only using an RDBMS as an example because it has rows and columns. To be excel-specific, substitute "table" with "sheet", "database" with "file".
Whats the most power feature in Excel? (Score:3, Interesting)
Re:Whats the most power feature in Excel? (Score:2, Insightful)
Each table of data is named for the week, ie "11-12-2004". The INDIRECT function lets a user type in the date he/she needs to look at and the model will pull in the data from the appropriate tab.
O
Re:Whats the most power feature in Excel? (Score:2, Insightful)
Re:Whats the most power feature in Excel? (Score:4, Funny)
Re:Whats the most power feature in Excel? (Score:2)
Clippy is my favorite feature, of course. And by "feature", I mean "thing that makes me want to shove my mouse through my monitor".
Re:Whats the most power feature in Excel? (Score:2)
Thank you for that comment. It is hilarious and true. Hat's off to you, AC! It perfectly illustrates the power and the danger of Excel. It also made me laugh enough to alarm the neighbors.
What's a pivot table (Score:5, Insightful)
And then ! (Score:2, Funny)
I would have to query the data out of oracle for them, and pivot the data for them, so they could send the report to the client.
Then, they would get HUGE commissions checks for pushing the "send" button in Outlook, and I would get nothing.
Then.... I quit.
Summary of what a Pivot Table is (Score:5, Informative)
Name Age Height (cm)
---------------------
Jane 22 174
Dick 22 212
Mary 24 150
Greg 24 198
Dave 23 244
You can use pivot tables to come up with tables like this (but with correctly calculated values
Age Avg Height
--------------
22 190.5
23 244
24 174.5
For the most simple case, take any N-dimensional data, choose one of the dimensions to be your rows, choose one of the dimensions to be your columns, and choose a function of a dimension to be your field values. The more dimensions and data points you have, the more useful this becomes.
Re:Summary of what a Pivot Table is (Score:4, Insightful)
Region Product Sales
West Skirt $150
East Pants $160
West Pants $80
East Skirt $90
Pivot:
Region Skirt Pants
West $150 $80
East $90 $160
For those who don't deal with pivot tables, they are used primarily to organize data so that relationships between the dimensions can be analyzed. In the example above, you can see that sales for pants and skirts are higher in one region than the other. While you can see this relationship right away in the raw data, it beomes harder when you have much more data. Pivot provide a way to slice data
Re:Summary of what a Pivot Table is (Score:2)
The above data points describe height by age and person. It's two-dimensional data, but you're show
Pivot table was the foosball table (Score:3, Funny)
Excel Feature? (Score:2, Informative)
Re:Excel Feature? (Score:2)
OWC covered? (Score:2)
Ughhh... (Score:4, Insightful)
Part of what makes it so painful is you get stuck spending your time trying to figure out how to do something the-right-way in excel when the same task would be trivial in a database. It's not just a matter of burning everything to the ground because, if you take that approach, you are forced into accepting responsibility for rewriting the thing. Some of the stuff I've seen people make is just so thoroughly messed up as to be conceptually, not just technically, beyond redemption.
Of course, the flip side is, if people can do more stuff on their own, that's one less thing they have to bug me about... but the things they do hit you with become all the more painful.
deep hurting...
sandstorm....
PIvot tables? Yawn (Score:4, Informative)
Anybody reading this article who actually thinks these pivot tables sound "powerful" should look into some of the real row-based data mining tools out there. For starters I suggest looking at Weka [waikato.ac.nz] and Orange [uni-lj.si].
Weka in particular is extremely easy to use and you don't have to be a researcher to figure it out.
Re:PIvot tables? Yawn (Score:2)
Good lord, I think I can deduct an hour of slashdot browsing. Extremely useful, thanks!
Description of a Pivot Table (Score:3, Informative)
A pivot table:
or...
But in matrix form so that you end you with one cell for each color+location instead of one record. So the size of the matrix grows approximately by a power of 0.5 with respect to the number of results.
When viewing the page with Firefox . . . (Score:3, Insightful)
Would you like some FUD with those tips?
Hmm... (Score:2)
Ok (Score:2)
Pivot table info and resource (Score:4, Informative)
There seems to be some natural and/or knee-jerk confusion that pivot tables are some Microsoft-only creation. For some folks that naturally means that they'll never want to use them. That's too bad, a little bit like concluding that referential integrity or relational table structures are "so Microsoft" just because they're discussed in SQL Server documentation and literature.
Best discussion I've read of pivot tables as a generic tool for managing data appears in O'reilly's thin "Transact SQL Cookbook". Excellent book. The first few chapters are devoted to pivot tables alone. According to the authors, PTs are fundamental to solving many data storage and display problems. Have a read, then post more. :)
Quantrix does it better (Score:3, Informative)
Disclaimer: I'm not a shill--not even a customer, in fact. But I'm a friend of the author, and was a contributor to Quantrix's NeXTstep based predecessor.
Consorting with the Enemy? (Score:2)
what about sc? (Score:2)
the only real difference is that PivotTable in excel can be done automatically based on the names of columns, instead of having to go to the effort of writing a 3-5 line awk or perl script.
btw- I analyze most data using gnuplot. it's an extremely powerful and easy to use package. But graphs analysis is
SysAdmins, please play dumb about Pivot Tables... (Score:2, Funny)
Guess who the new data analyst is?
(along with the e-mail guy, the PBX guy, script monkey, tech support dude, etc...
Grokk-me-not
Much easier than the old way (Score:3, Funny)
You guys have it easy.
Re:OK, so what is it? (Score:5, Informative)
Re:OK, so what is it? (Score:2)
It allows a user-definable, multi dimensionable, dynamically alterable way to view, categorize, and report on your data.
Each field in a table or recordset is a dimension.
You can take each field and make it a row or column. Take temporal data for example. Let's say you have a sales table. You know the month. That's a good cantidate for a column. You know the sales branch, that's a good cantidate for the
Re:Dissing OpenOffice (Score:5, Interesting)
Re:Dissing OpenOffice (Score:3, Funny)
And I would suspect many more die trying to figure out what they are.
Re:Dissing OpenOffice (Score:2)
1) They work great until you start adding data to 'em, and then they blow up in your face right before your deadline. This means you have to recreate your pivot table from scratch -every- time you want to use it. You can't add data to your source sheet and expect it to work consistently.
2) They're irritating as hell, largely because E
Re:Dissing OpenOffice (Score:2)
Indeed - from everything I've read it seems like Excel is not really the ideal tool for this stuff most of the time either. I'd either use an Access-like tool for quick-and-dirty work, or a real RDBMS and a query tool.
Most of the examples in this discussion can be readily applied against millions of data points in only a few seconds with a line of SQL that would take a query tool all of 20 seconds to design. I wouldn't recommend trying that in Excel.
I'm n
Re:Dissing OpenOffice (Score:2)
You seem to have some issues of insecurity surrounding OpenOffice. Stop ranting and try reading what the guy said, instead of what you think he said.
Re:Dissing OpenOffice (Score:2)
So no, I'd never heard of pivot tables either. I'm not particularly anti- or pro-anything, though; the right tool for the job, I think.
I blame the parents (Score:2)
The standard way of "improving" your software is to go and talk to the users, find out what they need, what they like, what they don't like, and put it into your next version.
This is where microsoft's biggest problem is... its users don't know what they want, because most of them don't know what their program can do, or even what it ought to do. It's just the one on their desk top that they are assumed
Re:The Pareto Rule (Score:2)
The (frequently stated) problem with this observation is that which 20% varies from user to user. You see that in this discussion. Lots of people don't know what a Pivot Table is; quite a few others think it one of the most useful features of Excel. In my case, I imagine many people don't use the Reviewing features (change bars and the like) much if at all; I use them extensively.
Unfortunately, as noted in
Re:What I would like to see in SQL one day (Score:2)
Unsurprisingly, they've got it in Access. There's a 'crosstab query', which is basically a regular SELECT query with pivot table processing done to it. In SQL this appears as a 'PIVOT ON' clause, but I never did quite work out how to use it...
Re:Pivot tables are basically SQL aggregates? (Score:4, Insightful)
I use OO and the data pilot just ain't there yet.
If you've never used pivots (and have Excel) go play.
Are they perfect? No. I'd love to see an option to use something besides bar charts - XY plots with regressions would be the one big thing I'd like to see.
Dogu
Re:Pivot tables are basically SQL aggregates? (Score:2)
Re:Pivot tables are basically SQL aggregates? (Score:3, Insightful)
I've created Excel pivot tables and pivot charts as front ends to OLAP cubes stored in a MS SQL Server[1].
The main advantage is end-users can drag and drop predefined data elements to change the representation of data quickly. They can also choose which members of a data element to include / exclude.
So sure, lots of this can be done with SQL where clauses and group by/order by clauses. However, its a LOT faster with a pivot table / pivot chart.
As ot
Re:Hey Cool! (Score:2)
Not true (Score:2)
Sure there are other tools, but this gets the job done for a lot less cost.