Top Banner
Introduction to Excel Pivot Tables Sandra Archer University Analysis and Planning Support University of Central Florida Dr. Robert L. Armacost Higher Education Assessment and Planning Technologies SAIR October 2006
28

pivot table

Oct 29, 2014

Download

Documents

Rajat Sharma

pivot table excel
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: pivot table

Introduction to Excel Pivot Tables

Sandra ArcherUniversity Analysis and Planning SupportUniversity of Central Florida

Dr. Robert L. ArmacostHigher Education Assessment and Planning Technologies

SAIR October 2006

Page 2: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

2October 2006

Objectives Understand data organization and sources that are

appropriate for use with PivotTables Be able to use basic PivotTable techniques for data

exploration Create custom reports using PivotTables with

appropriate formatting

Page 3: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

3October 2006

Overview PivotTable terms and concepts PivotTable report source data types Creating a PivotTable report using the PivotTable report wizard Adding/removing fields to a PivotTable report Changing the layout of a PivotTable report Changing the PivotTable calculation method Refreshing the PivotTable data Showing/hiding the field list in a PivotTable report Formatting a PivotTable report Sorting/grouping data Creating a calculated field Creating a calculated item Brief overview of advanced PivotTable techniques

Page 4: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

4October 2006

Scenario You just delivered a report of student credit hours by

department “Can I see these numbers summarized by college also?” Scenario #1: “Sure, when I get back to my office, I will

insert rows for each college, write summing formulas, save file and email it back to you.”

Scenario #2: “Lets open the file and drag-and-drop it in right now.”

Possible with PivotTables

Page 5: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

5October 2006

What is an Excel Pivot Table? An interactive worksheet table

Provides a powerful tool for summarizing large amounts 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

General purpose: Quickly summarize data from a worksheet or from an external

source Calculate totals, averages, counts, etc. based on any numeric

fields in your table Generate charts from your pivot tables

Page 6: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

6October 2006

Pivot Table Advantages Interactive: easily rearrange them by moving, adding, or

deleting fields Dynamic: results are automatically recalculated

whenever fields are added or dropped, or whenever categories are hidden or displayed

Easy to update: “refreshable” if the original worksheet data changes

Page 7: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

7October 2006

Appropriate Data Data arranged in a list:

Columns represent fields Rows represent a record of related data

First row = column label Columns contain one sort of data

For example, text in one column and numeric values in a separate column

Remove subtotals You CAN work with subtotals, but use caution

De-normalized database extracts are great for pivoting!

Page 8: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

8October 2006

Appropriate Data Example Incomplete records:

First Last Gender Semester Major Credit HoursSandra Archer F Fall 1999 Statistics 15

Fall 2005 Industrial Engineering 6Hamilton Paws M Spring 2003 Philosophy 12

Summer 2005 Chemistry 12

First Last Gender Semester Major Credit HoursSandra Archer F Fall 1999 Statistics 15Sandra Archer F Fall 2005 Industrial Engineering 6Hamilton Paws M Spring 2003 Philosophy 12Hamilton Paws M Summer 2005 Chemistry 12

Spelled the same

Page 9: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

9October 2006

Appropriate Data Example Mixed use columns :

College Department FacultyCredit Hours

Science Statistics Ima Faculty 16YTD Expenses: $4,000

Humanities History Hesa Prof 12YTD Expenses: $3,500

Humanities Art Salvador Dali 24YTD Expenses: $2,000

College Department FacultyCredit Hours

YTD Expenses

Science Statistics Ima Faculty 16 $4,000Humanities History Hesa Prof 12 $3,500Humanities Art Salvador Dali 24 $2,000

Column Label

Page 10: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

10October 2006

Appropriate Data Example Column label issues:

College Department Faculty 2004 2005 2006 2004 2005 2006Science Statistics Ima Faculty $4,000 $5,000 $6,000 16 19 22Humanities History Hesa Prof $3,500 $4,500 $5,500 12 15 18Humanities Art Salvador Dali $2,000 $3,000 $0 24 21 0

YTD Expenses Student Credit Hours

College Department Faculty

YTD Expense

2004

YTD Expense

2005

YTD Expense

2006

Student Credit Hours 2004

Student Credit Hours 2005

Student Credit Hours 2006

Science Statistics Ima Faculty $4,000 $5,000 $6,000 16 19 22Humanities History Hesa Prof $3,500 $4,500 $5,500 12 15 18Humanities Art Salvador Dali $2,000 $3,000 24 21

Zero or Blank?

Page 11: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

11October 2006

Potential Uses Ad hoc reporting with “refreshable” summary table

reports Data validation and checking Web reporting Data exploration

Page 12: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

12October 2006

To Create a PivotTable1. Select any cell in the worksheet that contains data, or select all the data and

columns you want to include in the report. On the Data menu, click PivotTable and PivotChart Report.

2. In Step 1 of the wizard, make sure that Microsoft Excel list or database is selected.

3. Under What kind of report do you want to create?, make sure that PivotTable is selected.

4. Click Next.

Page 13: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

13October 2006

To Create a PivotTable (continued)5. Select the data Range you wish to include in your PivotTable

$A$1:$H$24 (cells that contain your data) Sheet1!$A:$H (columns that contain data) MyData (a named range that contains data) Note that you may create a PivotTable based on an external data source. See

the help section for more details. Also, you can base a PivotTable off of another PivotTable to avoid large file

sizes.

Page 14: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

14October 2006

To Create a PivotTable (continued)6. Select where you want your PivotTable to reside (the default is a

new worksheet within this workbook)

7. The create your PivotTable, either click Layout or Finish

Note: If you get the below

message and you are concerned about file size,

click Yes

Page 15: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

15October 2006

When Creating Your PivotTable: Understand your data Ask yourself what you want to know Remember the rules of where to place data fields:

Row Fields: display data vertically, in rows Column Fields: display data horizontally, across columns Data Items: numerical data to be summarized Page Fields: display data as pages and allows you to filter to a

single item

Changing the layout takes only seconds, so don’t worry about making it perfect the first time

Note: If the field list is hidden, click Show Field List on the PivotTable toolbar.

Page 16: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

16October 2006

Two Ways to Update

Use the layout option in the Wizard

Or, create an empty PivotTable and drag in fields from the field list

Page 17: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

17October 2006

Formatting Rename the fields in the gray boxes. Click the field

name, retype, and then press ENTER. Format Numbers:

Click a cell that contains numerical data, or the name of the field heading for that data.

Click the Field Settings button on the PivotTable toolbar, and then click Number.

In the Format Cells dialog box, click any option in the Category list.

Click OK twice.

You may use cell formatting buttons Note, hover at column or row beginning until you get a black

arrow to select that column or row before applying the format

Page 18: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

18October 2006

Formatting (continued) Apply an automatic format

Click in the report, and then click the Format Report button on the PivotTable toolbar

Select a format in the AutoFormat dialog box Select PivotTable Classic to remove auto formats   Generally apply auto formats as a last step

Page 19: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

19October 2006

Change the Display Change sort order

Click the field heading or any cell in the list that contains the data you want to sort.

On the PivotTable toolbar, click PivotTable, and then click Sort and Top 10.

Under AutoSort options, click Descending or Ascending. Click OK.

Change how data is summarized Click a cell in the data area or the field heading for the data

area. Click the Field Settings button on the PivotTable toolbar. In the Summarize by list, click an option, and then click OK.

Filter your data with a page field

Page 20: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

20October 2006

Add Fields to the PivotTable Report Drag in fields from the PivotTable Field List or return

to the PivotTable Wizard and click Layout If the PivotTable Field List is not visible, click on the report

You don't have to undo an existing report to add another field

More than one field can be dragged onto any of the drop areas on the report A PivotTable report with more than one row field has one inner

row field (closest to the data area) and other outer row fields Items in the outermost row field are displayed once; items in the

rest of the row fields are repeated as necessary Any field can be used more than once on a report, even in the

same drop area

Page 21: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

21October 2006

Calculation Options Use a summary function other than SUM

Click the data field heading or a cell within the data field, and then click the Field Settings button on the PivotTable toolbar.

In the Summarize by list, select a different summary function, and then click OK

Use a custom calculation* to show data another way Click in one of the cells in the data area On the PivotTable toolbar, click the Field Settings button Click the Options button In the Show data as list, click the arrow, scroll down the list,

and then make a selection such as % of total. Click OK.

* Use with caution. Make sure you are getting expected results.

Page 22: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

22October 2006

Calculation Options (continued) Use calculated fields* or calculated items* to enter your

own formulas based on the information in the data area in a PivotTable report. Calculated field: when using data from another field in your

formula For example, compute student/faculty ratio when student count

and faculty count are two separate fields Calculated item: when using data from one or more specific

items within a field For example, compute % of students that are female when gender

is one field

* Use with caution. Make sure you are getting expected results (for example, does your total row sum the percentages or recalculate the percentages?)

Page 23: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

23October 2006

Change the Data After changes are made to the information source, click

the Refresh Data button If you have added columns or rows to your data source,

make sure to update the data range Right click on the PivotTable, click PivotTable Wizard, click the

back button Note, if you insert rows into your current data range, the

PivotTable will automatically update

Page 24: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

24October 2006

Cell References to a PivotTable GETPIVOTDATA function appears automatically when you type an

equal sign (=) outside of the report and then select a cell inside the report GETPIVOTDATA function retrieves data from the report and continues

to do so even if the report layout changes. If you remove any of the fields referenced in the GETPIVOTDATA

formula from the report, the formula returns #REF!. If you do not want to use the function:

Type an equal sign (=) in a cell outside of the report. Type the cell address that contains the value that you want to reference.

You can also add a button to the PivotTable toolbar to turn the GETPIVOTDATA function on and off. With a PivotTable report open, on the PivotTable toolbar, click the

Toolbar Options arrow on the right end of the toolbar. Click Add or Remove Buttons, click PivotTable, and then click

Generate GetPivotData. When you click in your worksheet, you'll see the Generate

GetPivotData button on the toolbar. When selected, the button turns the function on. Select the button to turn the function on or off.

Page 25: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

25October 2006

Tips Blank ≠ Zero Double click on any data point to view the rows that

comprise that value To keep file size small

Right click on the PivotTable -> table options -> uncheck “save data with table layout”

Make a PivotTable data source be a previous PivotTable If you want to keep column widths unchanged:

Right click on the PivotTable -> table options -> uncheck “AutoFormat” table

If you want the rows or columns of your pivot tables to remain unchanged, regardless of filter selection: Right click on the grey box (field name) in the “row” or “column”

position -> field settings -> check “show items with no data”

Page 26: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

26October 2006

Frequently Encountered Issues Can I use a PivotTable if I have no numeric fields?

Yes, you can create frequencies by bringing a non-numeric text field into the “data” section and setting the “summarize by” to count

The PivotTable wizard did not automatically select all of the data to include Make sure all blank rows are removed

My data changed, but the PivotTable did not update Make sure to hit the Refresh button the PivotTable toolbar

I added new rows to the data, but the PivotTable did not reflect this new data Update the data range For example, if you added rows 201 – 210, Right Click on the

PivotTable -> PivotTable Wizard -> Back -> Change the Range from “Data!$A$1:$D$200” to “Data!$A$1:$D$210”

Alternatively, when creating the PivotTable, reference the columns: “Data!$A:$D”

Page 27: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

27October 2006

Notes

All examples here are with Excel 2003 Some options are new to this version

You CAN create an Excel Pivot table from external data sources using either Microsoft Query and Open Database Connectivity (ODBC) or data source (OLEDB) drivers

You CAN use Excel PivotTables to explore your MS Access (.mdb) tables!

Visit the help section for more details

Page 28: pivot table

"Introduction to Excel PivotTables", Presented by: S.Archer & R.Armacost University of Central Florida

28October 2006

Contact Information & ResourcesSandra Archer

Interim Director

University Analysis and Planning Support

University of Central Florida

12424 Research ParkwaySuite 215

Orlando, FL 32826-3207

407-882-0287

[email protected]

http://uaps.ucf.edu

Dr. Robert L. Armacost

Higher Education Assessment and Planning Technologies

602 Shorewood Drive, Suite 402

Cape Canaveral, FL 32920

321-784-9921

[email protected]

Some information in these slides is from the Microsoft Training Webpage: http://office.microsoft.com/en-us/training/ default.aspxCopyright © 2004 Microsoft Corporation, One Microsoft Way, Redmond, Washington 98052-6399 U.S.A. All rights reserved.