Pivot Table Data Crunching: Microsoft Excel 2010
Total Page:16
File Type:pdf, Size:1020Kb
Contents at a Glance Introduction 1 Pivot Table Fundamentals 2 Creating a Basic Pivot Table 3 Customizing a Pivot Table 4 Grouping, Sorting, and Filtering Pivot Data MrExcel 5 Performing Calculations Within Pivot Tables LIBRARY 6 Using Pivot Charts and Other Visualizations 7 Analyzing Disparate Data Sources with Pivot Tables Pivot Table 8 Sharing Pivot Tables with Others 9 Working with and Analyzing OLAP Data Data Crunching 10 Mashing Up Data with PowerPivot 11 Enhancing Pivot Table Reports with Macros ® ® Microsoft Excel 2010 12 Using VBA to Create Pivot Tables 13 Advanced Pivot Table Tips and Techniques 14 Dr. Jekyll and Mr. GetPivotData A Finding Pivot Table Commands on the Ribbon Index Bill Jelen Michael Alexander 800 East 96th Street, Indianapolis, Indiana 46240 USA Pivot Table Data Crunching Executive Editor Greg Wiegand Copyright © 2011 by Pearson Education, Inc. Acquistions Editor All rights reserved. No part of this book shall be reproduced, Loretta Yates stored in a retrieval system, or transmitted by any means, elec- Development Editor tronic, mechanical, photocopying, recording, or otherwise, within Sondra Scott of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages Technical Editor resulting from the use of the information contained herein. Bob Umlas ISBN-10: 0-7897-4313-2 Managing Editor Sandra Schroeder ISBN-13: 978-0-7897-4313-8 Project Editor Printed in the United States of America Seth Kerney Third Printing: January 2013 Copy Editor Jovana San Nicolas-Shirley Trademarks Indexer All terms mentioned in this book that are known to be trade- Tim Wright marks or service marks have been appropriately capitalized. Que Production Publishing cannot attest to the accuracy of this information. Use of Jake McFarland a term in this book should not be regarded as affecting the validity Cover Designer of any trademark or service mark. Anne Jones Warning and Disclaimer Book Designer Anne Jones Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an “as is” basis. The author and the publisher shall have neither liability nor responsibility to any per- son or entity with respect to any loss or damages arising from the information contained in this book. Bulk Sales Que Publishing offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please contact U.S. Corporate and Government Sales 1-800-382-3419 [email protected] For sales outside of the United States, please contact International Sales 1-317-428-3341 [email protected] Contents Introduction ............................................................................................. 1 1 Pivot Table Fundamentals ........................................................................11 What Is a Pivot Table?................................................................................................................... 11 Why Should You Use a Pivot Table? ..............................................................................................12 When Should You Use a Pivot Table? ............................................................................................ 13 Anatomy of a Pivot Table .............................................................................................................. 14 Values Area ............................................................................................................................. 14 Row Area ................................................................................................................................ 15 Column Area ........................................................................................................................... 15 Report Filter Area ................................................................................................................... 16 Pivot Tables Behind the Scenes .................................................................................................... 16 Limitations of Pivot Table Reports ................................................................................................ 17 A Word About Compatibility ...................................................................................................18 Next Steps..................................................................................................................................... 19 2 Creating a Basic Pivot Table .....................................................................21 Preparing Data for Pivot Table Reporting ..................................................................................... 21 Ensure Data Is in a Tabular Layout ..........................................................................................22 Avoid Storing Data in Section Headings ................................................................................. 22 Avoid Repeating Groups as Columns ...................................................................................... 23 Eliminate Gaps and Blank Cells in the Data Source ................................................................. 24 Apply Appropriate Type Formatting to Fields ......................................................................... 24 Summary of Good Data Source Design ................................................................................... 24 Creating a Basic Pivot Table .......................................................................................................... 26 Adding Fields to the Report ....................................................................................................29 Adding Layers to a Pivot Table ............................................................................................... 32 Rearranging a Pivot Table ......................................................................................................32 Creating a Report Filter........................................................................................................... 34 Introducing Slicers ........................................................................................................................ 35 Keeping Up with Changes in the Data Source .........................................................................39 Changes Have Been Made to Existing Data Sources ................................................................40 Data Source’s Range Has Expanded ........................................................................................ 40 Sharing the Pivot Cache ................................................................................................................ 40 Side Effects of Sharing a Pivot Cache ...................................................................................... 41 Saving Time with New Pivot Table Tools ...................................................................................... 42 Deferring Layout Updates .......................................................................................................42 Starting Over with One Click ...................................................................................................43 Relocating a Pivot Table ......................................................................................................... 43 Next Steps..................................................................................................................................... 44 iv Pivot Table Data Crunching: Microsoft Excel 2010 3 Customizing a Pivot Table ........................................................................45 Making Common Cosmetic Changes .............................................................................................46 Applying a Table Style to Restore Gridlines ............................................................................ 47 Changing the Number Format to Add Thousands Separators .................................................48 Replacing Blanks with Zeros ................................................................................................... 49 Changing a Field Name ........................................................................................................... 50 Making Layout Changes................................................................................................................ 51 Using the New Compact Layout.............................................................................................. 52 Using the Outline Form Layout ...............................................................................................53 Using the Traditional Tabular Layout ......................................................................................54 Controlling Blank Lines, Grand Totals, Subtotals, and Other Settings .....................................57 Customizing the Pivot Table Appearance with Styles and Themes ............................................... 58 Customizing a Style ................................................................................................................ 60 Choosing a Default Style for Future Pivot Tables .................................................................... 61 Modifying Styles with Document Themes .............................................................................. 62 Changing Summary Calculations