Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
Using Pivot Tables in Excel

Using Pivot Tables in Excel

Ratings:

4.0

(1)
|Views: 521|Likes:
Published by Romero Ranulfo

More info:

Published by: Romero Ranulfo on Jul 03, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

07/13/2010

pdf

text

original

 
Using Pivot Tables in Excel
 What is an Excel Pivot Table?
A pivot table is an interactive worksheet table that provides a powerful tool for summarizing largeamounts of tabular data.
 
Similar to a cross-tabulation table, a pivot table classifies numeric data in a list based on other fields in the list.
 
What can you do with Pivot Tables?
You can quickly summarize data from a worksheet or from an external source.
 
You can calculate totals, averages, counts, etc. based on any numeric fields in your table.
 
You can generate charts from your pivot tables.
 
What are the advantages of using Pivot Tables?
Pivot tables are interactive, which means you can easily rearrange them by moving, adding, or deleting fields.
 
Pivot tables are dynamic, which means results are automatically recalculated whenever fields areadded or dropped, or whenever categories are hidden or displayed.
 
Pivot tables are easy to update if the original worksheet data are changed.
 
The best way to learn about Pivot Tables is through
hands-on
experience!!
 
Part 1: Constructing a Pivot Table
 1.Open the Excel file we’re going to use. It’s fake data I took from a Pivot Tables workshop given by Robert Lee of the University of Victoria (Note that much of this presentation steals materialfrom this workshop). Take a few seconds to familiarize yourself with the data in this worksheet.What is each column telling us?
 
2.Under the “Data” menu, select “Pivot Table and Pivot Chart Report.” This will bring up the PivotTable Wizard, which consists of three steps.
 
a.Step 1: Since the data resides in a worksheet, simply click “Next.”
 
 b.Step 2: Excel will automatically select the data we are currently working with. Click “Next” again.
 
c.Step 3: I usually open the pivot table in a new worksheet (again, this is the default). Notethat you can save a few seconds simply by clicking “Finish” on step 1 if you don’t plan todo anything unusual (which, in my experience, is almost every time).
 
3.We now have a new worksheet with a blank pivot table, and a pivot table box menu thingyconsisting of menus, buttons, and a list of all the data fields. Suppose we want to know the total
 
sales for each employee. Drag the “Employee” field into the “Row” area, then drag the “Order Amount” field into the “Data” area. This results in a table of total sales by employee.
Part 2: Modifying a Pivot Table
 1.We want to change the format of the amount to dollar format. Right click on any number in thetable under “Total” and select “Field Settings.” Click on the “Number” button. Select“Currency” format and click OK.
 
2.Pretend that we want to know how much each employee sold in different product categories(refer back to the data if you need to remember what these are). Drag over the “Categories” fieldfrom the Pivot Table box and put it in the blank space above the “Total” column. This produces across-tabulation table of total sales by employee and by category.
 
3.Suppose we’re more interested in
average
sales instead of 
total 
sales. Right click on any datafield cell (i.e. any dollar amount) and select “Field Settings.” Select “Average” and click OK.This produces a cross-tabulation table of average sales by employee and by category.4.Suppose we want number of sales instead. Right click on any data field cell and select “FieldSettings.” Select “Count.” Now, because we don’t want this to be displayed as a dollar amount,click the “Number” button, then select “Number” and reduce the decimal places to 0. Click OK and OK. Now we have a cross-tabulation table of the number of sales by employee and bycategory.
 
5.Suppose we aren’t interested in every product category. In this case, we’re not really interested inBeverages and Dairy Products. Click on the down arrow on the pivot table next to “Category.”In the drop down menu, uncheck “Beverages” and “Dairy Products” and click OK. Thiseliminates these two categories from the table.
 
6.Suppose we want to know the
 percentage
of sales each employee had in each category. Returnthe data back to the sums in dollar format: Right click on a cell, select “Field Settings,” select“Sum,” click on the “Number” Box, select “Currency,” select 2 decimal places. Now right click and select “Field Settings” again. Select “Options.” Under “show data as” select “% of Row”and click OK.7.Suppose we want to know monthly sales by category for each employee.a.First, change the row % back to sums in dollar format (Field settings
à
Change % of Rowto “Normal”
à
Select “Number” then “Currency”).
 
 b.Next, drag the “Shipping Date” field from the Pivot Table box into the Row area. Notethat you can put it to the left or right of the employee field. We want to put it to the right, because we want to know shipping date by employee, not employee by shipping date.
 
c.The summaries are too detailed! We want to group them at the month level. Right click on a cell in the “Shipping Date” column. Select “Group and Outline,” then select“Group.” Select “Months” and click OK.
 
2.To format the report in a way that changes it’s appearance, we can use the “Format Report”feature. Right click on a cell in the pivot table and select “Format Report.” Experiment withdifferent styles to see what you like best. To go back to the original look, simply select “Undo”(Control-Z) from the Edit menu at the top of the screen. [Note: if you save the data after youchange the format, you can’t undo the format].
 
3.Now move the “Employee” field from the pivot table up into the “Page Fields” area. By usingthe drop-down menu, we can look at each employee separately, or all of them combined.
 
4.Suppose we want a complicated table with lots of information. We want to know, for eachemployee, monthly sales within product categories to each country. We want to know the totalamount of these sales, the number of sales, and the sum of the freight costs, all displayed at thesame time.
 
a.Drag “Shipping Country” into the Row area, to the right of the month.
 
 
 b.Drag “Order Amount” into the Data area. Right click on a cell giving data for the newOrder Amount row, select Field Settings, and change it from Sum to Count.
 
c.Drag “Freight Costs” into the data area. Right click on a cell giving this new data, selectField Settings, Number, and Currency.
 
Part 3: Using the Pivot Chart Feature
 First, simplify the current pivot table by removing the shipping country field and all data fields except“Sum of Order Amount.” 1.If we want to create a chart for Callahan’s monthly sales by category, select “Callahan” from thePage Fields menu. Then right click on a cell in the Pivot Table and select “Pivot Chart.” A chartis automatically generated. Note that you can view the data for any employee simply by usingthe drop down menu at the top of the chart, and you can modify the chart by either of the other two variables by using the filter menus on the bottom and side.
 
2.If you don’t like the type of chart Excel chooses, you can modify it by right clicking anywhere onthe chart and selecting “Chart Type.”
 
3.Note that if you modify the pivot table in any way, the chart is automatically updated.
 
Part 4: Pivot Tables and Datatel
When you go back to your office you’ll likely be using a different dataset than the one we used here, andyou’ll be trying to do something very different than figuring out sales per employee. The following areanswers to anticipated problems that you might face. 
 If run a query that gives me a list of students with ethnicity, major, and class level, how can I turn that into a pivot table? There is no numeric field to use for the data.
One solution is to use Student ID as the data field. If all you are doing is counting students (i.e.number of students in each major by class level), put student ID in the data field and use the fieldsettings menu to change it from “Sum” to “Count.”
 
Another solution is to create a new column that consists entirely of the number 1. You can thenuse this column as a data field to count or sum (but be sure this is appropriate to the analysis youare doing).
 
The Pivot Table won’t automatically select all of my data. What’s wrong?
Make sure you don’t have any blank rows or columns in your dataset.
 I changed the data in my original dataset, but the pivot table stayed the same. How do I update the pivot table?
Simply click on the “Refresh” button (the
!
) on the pivot table box and your table will reflect anychanges in the data.
 
 I added new rows of data to my original dataset, but when I refreshed the pivot table, nothing changed! Help!
You need to change the
location
of the pivot table data. It is likely that the pivot table is still onlyworking with the original lines of data. If your original dataset went from row 1 to row 200, andthen you added rows 201-225, the pivot table will still only look at rows 1-200, no matter howmany times you push the “Refresh” button. On the drop-down menu in the pivot table box, selectthe pivot table Wizard. Push the “Back” button until you reach step 2, and change the rownumber (i.e. change the number “200” to a 225).
 

Activity (3)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Paul958 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->