pivot tables

51
Pivot Tables: Step by Step Gail Jones-Nemeth Toledo, Ohio CSSL1 0

Upload: gjonesnemeth

Post on 07-May-2015

3.771 views

Category:

Documents


6 download

DESCRIPTION

Well-received sessiosn at Dynamics SL User Group Annual conference and MS Convergence

TRANSCRIPT

Page 1: Pivot Tables

Pivot Tables: Step by Step

Gail Jones-NemethToledo, Ohio

CSSL10

Page 2: Pivot Tables

Agenda

Starting a new Pivot Table or chart from data extracted into Excel QueryPivot Tables

Laying out rows, columns, valuesCosmetics – make it pretty!Filtering, totaling, subtotaling, sorting, groupingDrill Down: Expanding and collapsing

Pivot ChartsData setupTime series chart

Page 3: Pivot Tables

About the Presenter

Solomon consultant for 15 years, beginning in 1985; Betco CIO 2000-2010Betco is regional manufacturer and distributor of floor finishes, skin care products, and cleaning chemicals and equipment for the Jan/San and institutional/educational marketsDeeply implemented Dynamics-SL site

Page 4: Pivot Tables

Excel Query Tips

Create read-only access user group with specific read-only rights only to tables that need to be queriedUse SQL authentication to assign rightsCreate separate database with predefined, read-only views to shorten list of tablesKeep your spreadsheets small

Skip straight from extract to Pivot Table reportDon’t save data in the Pivot Table!

Page 5: Pivot Tables

Pulling Data from Queries

First way: From data in same spreadsheetInsert/Pivot table/Pivot Table/Select Table or Range

Page 6: Pivot Tables

Pulling Data from Queries

Second Way: Directly from QueryData/Get External Data/From Other Sources/From Microsoft Query

Page 7: Pivot Tables

Pulling Data from Queries

Create your Query as before When returning from Query, choose “Pivot Table”

Page 8: Pivot Tables

Now You’re Ready to Pivot!

Page 9: Pivot Tables

Pivot Basics Rows, columns, and values

Just click or drag a field

“Click” defaults to rowsDrag to columns (especially time)Numbers default to “Summary Values”

Page 10: Pivot Tables

Pivot BasicsRow and column headings

Right click on field and choose “Field Settings”Update the Field Name

Or Edit the Field Name on Formula Bar

Page 11: Pivot Tables

Pivot BasicsValues Formatting

Right click on the menu and choose “Number Format”

Page 12: Pivot Tables

Pivot TablesMenuing

Dialog boxes from prior version are reached from the right-click menu

Field Settings – attributes of each fieldField List – applies to placing fields on tablePivot Table Options – settings apply to entire pivot table

Generally, most often used features also have been moved to the

right-click menuFormat cellsFormat numbersSubtotalGroupCollapse

Page 13: Pivot Tables

Pivot TablesMenuing

Most functions now appear on the Pivot Table “Options” menu

Page 14: Pivot Tables

Pivot TablesFilters

For a field not in the row or columnDrag unused field to “Filter” box to exclude data

Drag field to the filterClick “All” from pull downSelect multiple itemsSelect/Deselect specific data elements

Page 15: Pivot Tables

Pivot TablesFilters

For a field that is already selected on the Pivot Table, use the pull down menu on the Pivot Table row or column heading to Select or Deselect

Page 16: Pivot Tables

Pivot TablesGrand totals

Right click anywhere in Pivot Table to get to menuSelect “Pivot Table Options”

Page 17: Pivot Tables

Pivot TablesGrand totals

Select/Deselect check box for rows and columns

Page 18: Pivot Tables

Pivot TablesSetting column width to stick

Also from “Pivot Table Options”

Uncheck “Autofit column widths on update”Set column widths as you like

Page 19: Pivot Tables

Pivot TablesKeep the file small

Also from “Pivot Table Options”

Uncheck “Save source Data with file”

User will not be able to change the data unless they can refresh the view

Page 20: Pivot Tables

Pivot Table OptionsEnabling drill-down

Also from “Pivot Table Options”

Be sure to set “Classic Pivot Table” On so that collapsing works better

Page 21: Pivot Tables

Pivot TablesSubtotaling

Add multiple fields to the row, especially ones that are 1-1 (e.g., ClassID and Class Descr)Right click on first field to remove subtotal from (in this case – ClassID)Toggle “Subtotal” from the menu

Page 22: Pivot Tables

Pivot TablesSubtotaling

Which now removes the subtotals at the ClassID level

Page 23: Pivot Tables

Pivot TablesCollapse

To create drill down, collapse each levelRight click on column to Collapse, and choose “Collapse Entire Field”

Page 24: Pivot Tables

Pivot TablesCollapse

Which looks like thisNote the “+” sign beside the buyer elements

Page 25: Pivot Tables

Pivot TablesExpand/Collapse

The field can now be expanded by clicking on the “+” sign to expand or “-” sign to collapse

Page 26: Pivot Tables

Pivot TablesSorting

Right click on field to sort on (in this case, “Buyer”)Select Sort/More Sort OptionsChange to Descending by Total Cost

Page 27: Pivot Tables

Pivot TablesSorting

Which brings us to thisNote: Sort is by “Grand Total” of rowMust sort each subgroup

Page 28: Pivot Tables

Pivot TablesGrouping

Start by highlighting the top four itemsRight click, then select “Group” from the menu

Page 29: Pivot Tables

Pivot TablesGrouping

Repeat for the bottom three itemsResort by Group and collapse second group This brings us to Note: You can rename the group from the formula bar

Page 30: Pivot Tables

Pivot TablesDesign

From the top menu, select Design/Pivot Table Style Options

Check “Banded Rows” or “Banded Columns”

Select Pivot Table Style

Page 31: Pivot Tables

Pivot TablesDesign

Which brings us to this

Page 32: Pivot Tables

Pivot TablesCreating a formula field

Select Options/Formulas/Calculated Field

Page 33: Pivot Tables

Pivot TablesCreating a formula field

Type in field name (e.g., “Rounded Cost”)Use “Insert Field” button to copy field name to formula lineEnter formula (e.g., TotCost/1000)

Page 34: Pivot Tables

Pivot Tables Adding second values field

If “NewField” automatically added to the pivot table below the original field (“stacked”, like this)

Page 35: Pivot Tables

Pivot TablesSide by side values

To get the summary fields to be side by side, uncheck “NewField” on the “Field List”, then recheck “NewField”Note that now the “Values” option shows in the Column Labels

Page 36: Pivot Tables

Pivot TablesSide by side values

Now the table looks like this

Page 37: Pivot Tables

Pivot ChartsData sources

Pivot Charts can be sourced fromExisting data in a refreshable data extract from another Pivot Table directly from a query

To start from a Pivot Table, use Insert/Pivot Table/Pivot ChartOptions/Tools/Pivot Chart

Page 38: Pivot Tables

Pivot ChartsData sources

Or start from a new query, and when returning data:

Select “Pivot Chart and Pivot Table Report” option

Page 39: Pivot Tables

Pivot ChartsData layout

Page 40: Pivot Tables

Pivot ChartsData layout

For time series, time period is in the Row (e.g., Fiscal Year)On stacked bar, slices are the Columns (e.g., CpnyID)

Page 41: Pivot Tables

Pivot ChartsMenus

Once focus is on a Pivot Chart, new menu items appear

Page 42: Pivot Tables

Pivot ChartsFormatting values on legend

Before formatting the pivot table, legend looks like this

Page 43: Pivot Tables

Pivot ChartsFormatting values on legend

After formatting the pivot table value, legend looks like thisNote that company is side by side in chart

Page 44: Pivot Tables

Pivot ChartsChanging Chart Type

Click inside the Pivot Chart, then choose Design/Change Chart Type

Click on format desired

Page 45: Pivot Tables

Pivot ChartsChanging Chart Type

The pivot chart now looks like thisCompany is stacked

Page 46: Pivot Tables

Pivot ChartsLayout options

Add Chart TitlesPut focus on the chart, then use Layout/Chart Title

Page 47: Pivot Tables

Pivot ChartsLayout options

Add Axis TitlesPut focus on the chart, then use Layout/Axis Title

Page 48: Pivot Tables

Pivot ChartsLayout options

Looks pretty good!

Page 49: Pivot Tables

Pivot ChartsDesign

Use Quick Layout and Quick Styles to enhance chartExample starts at Design/Quick Layout

Page 50: Pivot Tables

Pivot ChartsPivot chart filter pane

Giving us a final answer like this

Page 51: Pivot Tables

Questions?

Thank You!Contact me at [email protected]