Professional Documents
Culture Documents
Lesson 5-1: Create a one dimensional pivot table report from a table
Inthislesson,youlljumpstraightintothedeependandcreateasimple onedimensionalpivottable.Theresahugeamounttolearnaboutpivot tablesbutitwillbefuntodosomeusefulworkwithonestraightaway. Heresthesamplefilewelluseinthislesson:
Thisisthetypeofworksheetthatpivottablescanworkwellwith becausethecolumnscontainrepeatingdata. Thesamplefilecontainsover2,000rowsoftransactionaldatalistingsales duringthe18monthperiodfromOctober2007toMarch2009inclusive. Youcanseefromthedatathattheworksheetcontainsdetailsoforders soldbyaDVDwholesaler,alongwiththetitlessuppliedoneachorder. Order136438wasplacedon1stOct07andwasorderedbySilverScreen Video.TheorderwassoldbyFrankLeeandtherewerefouritemsonthe order.TwoofthefilmsorderedwereintheDramagenreandtheother twowereintheBiographyandComedygenres. Abusinessmaywishtoaskseveralquestionsaboutsalesduringthis periodsuchas: WhatweremysalesbyGenre? HowmanyunitsdideachEmployeesell?
important
Pivot Tables, Ranges, Named Ranges and Tables
YoucancreateaPivotTable thatisassociatedwithaRange, aNamedRangeoraTable. Thefatalflawofnamedranges isthattheyonlyexpandand contractwhenrowsareinserted ordeletedandNOTwhendata isaddedtotheendofthe range.Youdiscoveredawork aroundtothisproblemin: Lesson46:Createdynamic formulabasedrangenamesusing theOFFSETfunction. Fortunately,Excel2007hasthe fantasticnewTablestructure. Tablesarewonderfultouseas adatasourceforPivotTables becausetheyaretrulydynamic. Youlearnedeverythingthereis toknowabouttablesin:Session One:Tables,Rangesand Databases.
Inthislesson,youlluseapivottabletoanswerbothquestionsinless than10seconds!
2 3
Transactions-1
190
www.LearnMicrosoftExcel.com
note
Drilling down into pivot table data
WheneverExcelshowsatotal, itispossibletodrilldownto seethetransactionsthatwere usedtocalculatethetotal. Whenyoudoubleclickona total,(suchasthetotalsalesfor actionmoviesincellC5),anew worksheetopensshowingthe sourcetransactions. Youllhavetomanuallydelete thisworksheetafterviewing thetransactionlist.
Format the values shown in column C of the pivot table so that they show two decimal places with a comma separator.
1. 2. 3. 4. RightclickonanyvalueincolumnC. ClickNumberFormat...ontheshortcutmenu. ClickNumberintheCategorylist. ClicktheUse1000Separatorcheckbox.
note
Activating a pivot table
Pivottablesarealittlelike chartsinthatyoucannotwork upontheirdesignunlessthey areactivated. Toactivate,yousimplyclick anywhereinsidethepivot table. Whenthepivottableis activated,thePivotTableField Listappearsalongwiththe PivotTableToolstabonthe Ribbon.
5. ClicktheOKbutton.
Clear all check boxes and then select the Employee and Qty check boxes.
Onceagain,withverylittleeffort,youhaveansweredthesecond question: HowmanyunitsdideachEmployeesell?
8 9
191