37
GE, Canada Best Practice Sharing – Pivot Tables - Gearing up to succeed in a data driven environment

Excel Training Pivot Tables[1]

Embed Size (px)

DESCRIPTION

Excel Training Pivot Tables[1]

Citation preview

  • GE, Canada

    Best Practice Sharing Pivot Tables -

    Gearing up to succeed in a data driven environment

  • 2 /

    Best Practice Sharing

    Forward

    This Excel document was created on the basis of my experiences lived through various situations at GE.

    I understand there might be numerous ways to perform tasks in Excel, and this document does not pretendto be completely comprehensive, but merely thoughts and guides based on personal experience.

    Special thanks to Melissa Kay for her precious help in making this document as perfect and straight forwardas possible.

    Please do not hesitate to contact me for any comments, suggestions, or if you need help with Excel. You cansend me an email at [email protected] and I will gladly reply.

    Thank you for your interest in this document. Best of luck in your future projects.

    Guillaume Cote-Provencher | FMP

  • 3 /

    Best Practice Sharing

    Table of Contents

    Module 4: Pivot Tables

    4.1. Select Source Data

    4.1.1. Basics

    4.1.1.1. Pivot Tables

    4.1.1.2. Insert Pivot Table

    4.2. Select Fields

    4.2.1. Basics

    4.2.2. Areas

    4.2.2.1. Values

    4.2.2.2. Labels

    4.2.2.3. Report Filter

    4.2.3. Multiple Variables

    4.2.3.1. Multiple Labels

    4.2.3.2. Multiple Values

    4.2.4. Pivot Table Tools

    4.2.4.1. Options

    4.2.4.2. Design

    4.3. Options & Settings

    4.3.1. Value Field Settings

    4.3.1.1. Number Format

    4.3.1.2. Type of Calculation

    4.3.1.3. Value Display

  • 4 /

    Best Practice Sharing

    Table of Contents

    Module 4: Pivot Tables

    4.3.2. Field Settings

    4.3.2.1. Subtotals

    4.3.2.2. Layout

    4.4. Calculated Fields

    4.4.1. Basics

    4.4.1.1. Simple Value Calculation

    4.4.2. Advanced Calculated Fields

    4.5. Trouble Shooting

    4.8.1. Refresh

    4.8.2. Source Data Does Not Cover the Whole Database

    4.8.3. Inserting a graph from a Pivot Table

  • 5 /

    Best Practice Sharing

    4.1. Select Source Data

  • 6 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.1. Select Source Data

    4.1.1. Basics

    4.1.1.1. Pivot Tables

    Pivot Tables organize, summarize, and consolidate databases in order to present the information in a more meaningful way

    Pivot Tables allow us to categorize and sub-categorize data in order to get a more detailed view of the data

    Pivot Tables allow us to cross-reference fields from a database to identify relations between different elements

    Example: Suppose this rather small database Imagine you were asked to calculate the Total Sales Volume by Sub-segment how would you do it?

    Sub-Segment Account Name Classification Total Sales Volume Disbursed Month

    Western Northstar Hydrovac Inc. High priority 475,650 1

    Western Northstar Hydrovac Inc. High priority 1,302,000 2

    East Transport Garipy (Canada) Inc. Non strategic 300,000 3

    Western Interlake Crane Inc. Strategic 215,750 4

    Western Progressive Harvesting (2000) Ltd. Non strategic 200,000 5

    East LOCATIONS NORDIQUES Strategic 185,000 6Western Kenson Oilfield Services Inc. Low priority 170,640 7

    Fleet Sobeys Capital Incorporated Low priority 150,000 8Fleet Sobeys Capital Incorporated Low priority 1,800,000 9Franchise Subway - Strategic 21,047 10

    East Capital Ready Mix Limited Strategic 207,000 11Western Bouchier Contracting Ltd. Strategic 605,000 12

    Western Bouchier Contracting Ltd. Strategic 209,650 1Fleet Bouchier Contracting Ltd. Low priority 80,000 2

    Western Bouchier Contracting Ltd. Strategic 185,421 3Ontario 933796 Ontario Inc. Strategic 208,500 4

    Fleet Foot Locker Canada Corporation Non strategic 50,000 5Franchise A&W Saskatchewan Strategic 408,382 6East Recyclage Freeland Low priority 256,000 7

    Western 907790 Alberta Ltd Strategic 501,000 8Western McMeekin Resources Ltd. Non strategic 63,000 9

    Western Brian Dean Strain Non strategic 145,631 10Western Paul Paquette & Sons Contracting Ltd. Strategic 60,650 11

    East Les Forages Technic-Eau Inc. High priority 1,000,000 12Western Valley Gravel Sales Ltd Strategic 280,600 1

    East Les Constructions Bricon Lte Strategic 78,030 2East 3158764 Canada Inc. Strategic 500,000 3

    Vendor 3158764 Canada Inc. Strategic 62,123 4

    Data

  • 7 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.1. Select Source Data

    You could filter each Sub-segment and sum up their Total Sales Volume However, there are 6 different sub-segments and you would need to filter all 6 of them And if you were asked to analyze 15 or 20 different sub-segment, would you still filter each and

    everyone of them? Suppose now you were asked to sum up the Total Sales Volume by Sub-segment and by

    Classification how would you proceed? Pivot Tables let you accomplish all of the efficiently

    Row Labels Sum of Total Sales VolumeEast 2,526,030

    Fleet 2,080,000

    Franchise 429,429

    Ontario 208,500

    Vendor 62,123

    Western 4,414,992

    Grand Total 9,721,073

    Row Labels Sum of Total Sales Volume

    East 2,526,030 High priority 1,000,000

    Low priority 256,000

    Non strategic 300,000

    Strategic 970,030

    Fleet 2,080,000 Low priority 2,030,000

    Non strategic 50,000

    Franchise 429,429 Strategic 429,429

    Ontario 208,500 Strategic 208,500

    Vendor 62,123 Strategic 62,123

    Western 4,414,992 High priority 1,777,650

    Low priority 170,640

    Non strategic 408,631

    Strategic 2,058,071

    Grand Total 9,721,073

    Total Sales Volume by Sub-segment

    Total Sales Volume by Sub-segment by Classification

    Basically what the Pivot Table did was add everything corresponding to the different criterions in the first case criteria was: Sub-segment; in the second case criterions were: Sub-segment and Classification

  • 8 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.1. Select Data

    4.1.1.2. Insert Pivot Table

    To insert a Pivot Table in a Excel spreadsheet: Select the Insert menu from the quick bar menu Select Pivot Table from the Tables section In the Create Pivot Table option box:

    Select a table or range select the database you want to analyze Choose where you want the Pivot Table to be placed Select new or existing worksheet

    (selecting new will insert the Pivot Table on a new tab)

    New tab will be created

    Select the cell in an existing tab where you want the Pivot Table to be inserted

    Select or type in the database you want to analyze

    Notes and Observations

    You can also use Atl + d + p to open the insert Pivot Table box The table range must contain headers If the table range does not contain headers the first row of data will be considered as headers If there is a header missing Excel will send an error message

  • 9 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.1. Select Data

    Message error if a header is missing

  • 10 /

    Best Practice Sharing

    4.2. Select Fields

  • 11 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    4.2.1. Basics

    After having inserted the Pivot Table in the Excel file you should see a Pivot Table Field List on the right hand side of the spreadsheet

    The Pivot Table Field List menu lets you select the shape and the data that will be analyzed in the Pivot Table

    Location of the Pivot Table

    The Pivot Table field list contains all the fields from the Source Data

    Fields can be dropped into the different areas to shape and determine which elements are to be calculated in the Pivot Table

  • 12 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    4.2.2. Areas

    Numerical Values: numerical values can be added, multiplied, divided, subtracted, averaged, etc. (e.g. of numerical values: Sales Volume, ROI, NBM, ANI)

    Non Numerical Values: Some values the only operation linked to non numerical values is count (e.g. of non numerical values: Region, Classification, Product, Stage)

    4.2.2.1. Values

    Values are the result of the Pivot Table analysis Values should correspond to the field you want to

    see calculated as a result of the Pivot Table The Pivot Table will display the Values in function of

    the different criterions (Labels) Values is the result of the information you are trying

    to extract from the database (e.g. I want to know the total sales volume (Values) by regions (criteria))

    Corresponding Pivot Table

    Values is the result of the information required what is the sum of Total Sales Volume regardless of any criteria

    Numerical Value

  • 13 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    4.2.2.2. Labels

    Labels correspond to the criterions by which the database is to be analyzed

    Column Labels: will list the elements corresponding to a criteria on the same row

    Row Labels: will list the elements corresponding to a criteria on the same column

    Labels act as subdivisions to help analyze the data

    Corresponding Pivot Table

    Corresponding Pivot Table

  • 14 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    Notes and Observations

    It is possible to group Labels within a Pivot Table

    Example:

    Take this Pivot Table and associated Field Box

    Suppose you want to regroup Sub-Segment East, Ontario, Western into a single Core Sub-Segment

    Select the values you want to group Right click on the selected group Select Group

    Row Labels Sum of Total Sales Volume Sum of Weighted ROI

    Group1Ontario 230,001 2.08%East 2,526,030 2.07%

    Western 4,414,992 2.06%

    FleetFleet 2,080,000 2.17%

    FranchiseFranchise 429,429 3.09%

    VendorVendor 62,123 2.32%

    Grand Total 9,742,574 2.13%

    Group1 can be renamed to the desired name

  • 15 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    Notes and Observations

    Sub-Segment2 was created as a result of grouping values from that Label

    New Pivot Table and associated Field Box

    New Pivot Table and associated Field Box using the new Sub-Segment2 label

  • 16 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    4.2.2.3. Report Filter

    Report Filter allows you to add rules to the Pivot Table without modifying the layout

    e.g. If you want the Total Sales Volume by region BUT only for strategic and non strategic accounts drag the Classification Field in the Report Filter area then, from the Pivot Table, select the elements from the Report Filter you want to see displayed

    Corresponding Pivot Table

    A filter is added to the Pivot Table

    Filter menu (like filters on databases)

    Classification (Multiple Items)

    Row Labels Sum of Total Sales VolumeEast 1,270,030

    Fleet 50,000

    Franchise 429,429

    Ontario 208,500

    Vendor 62,123

    Western 2,466,702

    Grand Total 4,486,783

    Indicates that the filter contains multiple items

    Grand Total now corresponds to Strategic and Non Strategic only

    Corresponding Pivot Table

  • 17 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    4.2.3. Multiple Variables

    The strength of Pivot Tables resides in the ability to cross-reference multiple variables for analysis quickly

    It is possible to add numerous Labels in a Pivot Table Each extra level of Labels adds to the precision of the data presented in the pivot

    The order of the extra Labels can impact the analysis and depends on what the user is really trying to analyze

    e.g.

    Row Labels Sum of Total Sales Volume

    East 1,270,030

    Non strategic 300,000

    Strategic 970,030

    Fleet 50,000

    Non strategic 50,000

    Franchise 429,429

    Strategic 429,429

    Ontario 208,500

    Strategic 208,500

    Vendor 62,123

    Strategic 62,123

    Western 2,466,702

    Non strategic 408,631

    Strategic 2,058,071

    Grand Total 4,486,783

    Basically it says: Divide the database by Sub-Segment then by Classification

    Sub-segments are subdivided by Classification

    Row Labels Sum of Total Sales Volume

    Non strategic 758,631 East 300,000 Fleet 50,000

    Western 408,631

    Strategic 3,728,152

    East 970,030 Franchise 429,429 Ontario 208,500

    Vendor 62,123 Western 2,058,071

    Grand Total 4,486,783

    Corresponding Pivot Table

    Corresponding Pivot Table

    Basically it says: Dive the database by Classification then by Sub-Segment

    Classification are subdivided by Sub-Segment

    4.2.3.1. Multiple Labels

  • 18 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    Extra levels of Labels can make the Pivot Table crowded and difficult to understand It is possible to arrange the shape of the Pivot Table to make it more straight forward by using both

    Column Labels and Row Labels

    Row Labels Sum of Total Sales Volume

    Q1

    Non strategic 313,000 Fleet 50,000

    Western 263,000

    Strategic 490,250 Western 490,250

    Q2

    Non strategic 145,631 Western 145,631

    Strategic 692,459 East 263,030

    Franchise 429,429

    Q3

    Non strategic 300,000 East 300,000

    Strategic 953,071 East 707,000

    Western 246,071

    Q4

    Strategic 1,592,373 Ontario 208,500

    Vendor 62,123

    Western 1,321,750

    Grand Total 4,486,783

    This Pivot Table might not be very intuitive

    Sum of Total Sales Volume Column Labels

    Row Labels Q1 Q2 Q3 Q4 Grand Total

    Non strategic 313,000 145,631 300,000 758,631 East 300,000 300,000

    Fleet 50,000 50,000

    Western 263,000 145,631 408,631

    Strategic 490,250 692,459 953,071 1,592,373 3,728,152 East 263,030 707,000 970,030

    Franchise 429,429 429,429

    Ontario 208,500 208,500

    Vendor 62,123 62,123

    Western 490,250 246,071 1,321,750 2,058,071

    Grand Total 803,250 838,090 1,253,071 1,592,373 4,486,783

    Same information presented differently

    Corresponding Pivot Table

    Corresponding Pivot Table

  • 19 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    Every Label can hold multiple Values

    4.2.3.2. Multiple Values

    Row Labels Sum of Total Sales Volume Count of Account Name

    Non strategic 758,631 5 East 300,000 1

    Fleet 50,000 1

    Western 408,631 3

    Strategic 3,728,152 15 East 970,030 4

    Franchise 429,429 2

    Ontario 208,500 1

    Vendor 62,123 1

    Western 2,058,071 7

    Grand Total 4,486,783 20

    All Values will be calculated for every Label

    Note: Account Name is a Non Numerical Value the only calculation is count count gives us the number of companies in the different buckets

    Corresponding Pivot Table

    Data corresponding to the Values

  • 20 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    4.2.4. Pivot Table Tools

    By clicking on a Pivot Table you enable the Pivot Table Tools quick menu bar The quick menu bar is divided in 2: Options and Design

    4.2.4.1. Options

    Sort: allows you to sort quickly the different Values in the Pivot Table Select one of the cell belonging to the Value Field you want to sort before selecting

    sort

    Refresh: Select refresh to update the values in the Pivot Table Refresh is IMPORTANT to use every time changes are made to the database from which

    the Pivot Table is pulling information

    Change Source Data: allows you to modify the area of the database from which the Pivot Table is pulling information

    Adding a new column or new rows requires a Source Data change if you want the Pivot Table to capture the changes made to the database

    Field List: allows you to open the Field List and Pivot Table areas menu box

  • 21 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.2. Select Fields

    4.2.4.2. Design

    Design allows you to customize the look of the Pivot Table

    Subtotals: allows you to customize the subtotals layout No subtotals Bottom of groups Top of groups

    Banned Rows/Columns: Allows you to separate each rows or columns of data with a colored line

    Pivot Table Style: allows you to choose a Pivot Table look from a list

    Row Labels Sum of Total Sales Volume Count of Account NameVendor 62122.64 1

    Ontario 208500 1 Franchise 429428.99 2

    Fleet 2080000 4

    East 2526030 7

    Western 4414991.5 13

    Grand Total 9721073.13 28

    Row Labels Sum of Total Sales Volume Count of Account NameVendor 62122.64 1

    Ontario 208500 1 Franchise 429428.99 2

    Fleet 2080000 4

    East 2526030 7

    Western 4414991.5 13

    Grand Total 9721073.13 28

  • 22 /

    Best Practice Sharing

    4.3. Options & Settings

  • 23 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.3. Option & Settings

    4.3.1. Value Field Settings

    Value Field Settings allows you to customize the Number Format, Type of Calculation and Value Display of the Values

    To access the Value Field Settings option box left click on the Field you want to customize

    4.3.1.1. Number Format

    Number Format

    Value Display

    Type of Calculation

    Number Format holds the same options as if you were customizing numbers in a cell Number Format allows you to change the Values number formatting (General, Percentage,

    Accounting, etc.)

    Left click on Field to open option box

  • 24 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.3. Option & Settings

    4.3.1.2. Type of Calculation

    Type of Calculation (Summarize Values By) is the type of calculation that will be applied to each Values in function of the Labels

    e.g. Average of Total Sales Volume by Sub-Segment will result in the average sales volume in function of the different segment

    4.3.1.3. Value Display

    Value Display (Show Value As) allows you to make an extra calculation on the Values

    Dropdown list of extra calculations on Values

    Menu of Type of Calculation

  • 25 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.3. Option & Settings

    Row Labels Sum of Total Sales Volume

    East 25.99%

    Fleet 21.40%

    Franchise 4.42%

    Ontario 2.14%

    Vendor 0.64%

    Western 45.42%

    Grand Total 100.00%

    Row Labels Sum of Total Sales Volume

    East 2526030

    Fleet 2080000

    Franchise 429428.99

    Ontario 208500

    Vendor 62122.64

    Western 4414991.5

    Grand Total 9721073.13

    No Calculation

    % of Column Total

    Showing Value as does NOT change the Values in absolute it generally shows proportions in functions of rows, columns, Grand Total, etc.

    e.g.

    Classic view

    % of Column Total allows you to display the Values as a proportion of the Fields Grand Total

    It allows you to very quickly spot that the Western region accounts for roughly 45% of Total Sales Volume

  • 26 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.3. Option & Settings

    4.3.2. Field Settings

    Field Settings allows you to customize the Labels options Options feature: Subtotals and Layout To access the Field Settings option box right click on the set of Labels you want to customize

    Notes and Observations

    Filters and Sort options can be accessed directly from the Pivot Table

    A dropdown menu list is available for each Label

    Basic sort options are available from the menu More Sort Options allows you to customize on which fields the sort will be applied

    4.3.2.1. Subtotals

    Subtotals options are available in the Pivot Table Tools menu

    4.3.2.2. Layout

    Layout options are available in the Pivot Table Tools menu

    One useful Layout option is Show items with no data Show items with no data allows the Pivot Table to keep the same dimension regardless if the

    occurrence of the Values is 0 or Blank

    Notes and Observations

    Row Labels Select to access Filter and Sort menu

    Sort menu was accessed from the Sub-Segment Label meaning we are sorting the Sub-Segment

    More Sort Options box

    Sub-Segments will be sorted in descending order according to their Sum of Total Sales Volume

  • 27 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.3. Option & Settings

    Notes and Observations

    When a formula makes reference to a cell in a Pivot Table it automatically inserts a formula: GETPIVOT() =GETPIVOTDATA() returns the value associated to a specific field from a Pivot Table

    e.g. =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","East","Classification","Strategic ","Quarter","Q1")

    In words this means: give me the Total Sales Volume for the strategic accounts in the Eastern region for Q1

    GETPIVOTDATA() can be part of a larger formula (i.e. you can use GETPIVOTDATA() only to obtain a value and then use this value in a more complex formula)

    Advantages of GETPIVOTDATA(): The formula will ALWAYS return the value referring to the criterions (strategic, East, Q1) even if the

    order of the Labels change

    Disadvantages of GETPIVTODATA(): The pivot has to retain the same criterions otherwise the formula will return an ERROR

    message You can NOT drag this formula the formula will retain the same criterions even if dragged

    You have to manually select each value from the Pivot Table to fit your desired criterions

    Region (Dragged)

    East =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","East","Classification","Strategic ","Quarter","Q1")

    Ontario =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","East","Classification","Strategic ","Quarter","Q1")

    Western =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","East","Classification","Strategic ","Quarter","Q1")

    Franchise =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","East","Classification","Strategic ","Quarter","Q1")

    Vendor =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","East","Classification","Strategic ","Quarter","Q1")

    By dragging the formula, Sub-Segment remained East which does not correspond to the region in the table

  • 28 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.3. Option & Settings

    Notes and Observations

    By manually selecting the cells in the Pivot Table corresponding to the items in the table the formula adjusts the criterions

    Region $

    East =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","East","Classification","Strategic ","Quarter","Q1")

    Ontario =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","Ontario","Classification","Strategic ","Quarter","Q1")

    Western =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","Western","Classification","Strategic ","Quarter","Q1")

    Franchise =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","Franchise","Classification","Strategic ","Quarter","Q1")

    Vendor =GETPIVOTDATA("Total Sales Volume",$A$3,"Sub-Segment","Vendor","Classification","Strategic ","Quarter","Q1")

    You can use Ctrl + H (replace) to modify only one of the criteria from a GETPIVOTDATA() formula e.g. Suppose you have manually entered the corresponding Pivot Table cells for Q1 it would be a

    long and useless process to manually enter the corresponding Pivot Table cells for Q2, Q3 and Q4

    Region Q1 Q2 Q3 Q4

    East 0

    Ontario 0

    Western 490250

    Franchise 0

    Vendor 0

    Region Q1 Q2 Q3 Q4

    East 0 0 0 0

    Ontario 0 0 0 0

    Western 490250 490250 490250 490250

    Franchise 0 0 0 0

    Vendor 0 0 0 0

    Copy the Q1 formulas onto the other quarters

    Replace Q1 with each appropriate quarter

    Region Q1 Q2 Q3 Q4

    East 0 263030 707000 0

    Ontario 0 0 0 0

    Western 490250 0 246071 1321750

    Franchise0 429429 0 0

    Vendor 0 0 0 62122.64

    GETPIVOTDADA() will now return values corresponding to the appropriate quarters

  • 29 /

    Best Practice Sharing

    4.4. Calculated Fields

  • 30 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.4. Calculated Fields

    4.4.1. Basics

    Calculated Fields let you create extra Fields that are not in the database Calculated Fields refer to Fields within the database but are modified by a calculation

    Examples for this chapter will refer to this database:

    Sub-Segment Account Name Classification Total Sales Volume ANI ROI NBM

    Western Northstar Hydrovac Inc. High priority 475,650 1,070,213 1.25% 2.87%

    Western Northstar Hydrovac Inc. High priority 1,302,000 2,929,500 2.62% 4.75%

    East Transport Garipy (Canada) Inc. Non strategic 300,000 675,000 1.83% 3.66%

    Western Interlake Crane Inc. Strategic 215,750 485,438 1.76% 3.30%

    Western Progressive Harvesting (2000) Ltd. Non strategic 200,000 450,000 1.96% 3.23%East LOCATIONS NORDIQUES Strategic 185,000 416,250 1.86% 3.33%

    Western Kenson Oilfield Services Inc. Low priority 170,640 383,940 2.27% 3.87%

    Fleet Sobeys Capital Incorporated Low priority 150,000 337,500 2.50% 4.21%Fleet Sobeys Capital Incorporated Low priority 1,800,000 4,050,000 2.16% 3.75%

    Franchise Subway - Strategic 21,047 47,356 2.27% 3.87%East Capital Ready Mix Limited Strategic 207,000 465,750 1.54% 3.02%

    Western Bouchier Contracting Ltd. Strategic 605,000 1,361,250 1.60% 3.09%

    Western Bouchier Contracting Ltd. Strategic 209,650 471,713 1.41% 2.64%Fleet Bouchier Contracting Ltd. Low priority 80,000 180,000 1.34% 2.54%

    Western Bouchier Contracting Ltd. Strategic 185,421 417,196 2.42% 4.39%Ontario 933796 Ontario Inc. Strategic 230,001 517,502 2.08% 3.92%

    Fleet Foot Locker Canada Corporation Non strategic 50,000 112,500 2.91% 5.46%

    Franchise A&W Saskatchewan Strategic 408,382 918,860 3.13% 5.17%East Recyclage Freeland Low priority 256,000 576,000 1.82% 3.98%

    Western 907790 Alberta Ltd Strategic 501,000 1,127,250 1.85% 3.89%Western McMeekin Resources Ltd. Non strategic 63,000 141,750 1.23% 2.64%

    Western Brian Dean Strain Non strategic 145,631 327,670 2.16% 4.18%Western Paul Paquette & Sons Contracting Ltd. Strategic 60,650 136,463 3.56% 6.13%

    East Les Forages Technic-Eau Inc. High priority 1,000,000 2,250,000 2.29% 4.22%

    Western Valley Gravel Sales Ltd Strategic 280,600 631,350 2.46% 4.54%East Les Constructions Bricon Lte Strategic 78,030 175,568 2.38% 4.48%

    East 3158764 Canada Inc. Strategic 500,000 1,125,000 2.18% 4.11%Vendor 3158764 Canada Inc. Strategic 62,123 139,776 2.32% 4.29%

    Data

    To insert a Calculated Field: Select the Option menu from the Pivot Table Tools quick bar menu

    Select the Fields, Items & Sets menu Select Calculated Fields

  • 31 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.4. Calculated Fields

    Suppose this Pivot Table

    4.4.1.1. Simple Value Calculation

    Row Labels Sum of Total Sales VolumeVendor 62,123

    Ontario 230,001

    Franchise 429,429

    Fleet 2,080,000

    East 2,526,030

    Western 4,414,992

    Grand Total 9,742,574

    Imagine you need the Total Sales Volume to be in $MM Presume you dont want to divide the results by 1,000,000 (simple calculation) every time you refresh the

    Pivot Table You can create a Calculated Field that will present the Total Sales Volume in $MM in the Pivot Table Select the Calculated Field menu

    Calculated Field option box

    Title of the Calculated Field (Calculated Field will appear in the Pivot Table Field List)

    Formula of the Calculated Field Formula can contain actual Fields

    or numerical values

    Double click on an existing Field to add it to the formula

  • 32 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.4. Calculated Fields

    Row Labels Sum of Total Sales Volume Sum of Volume ($MM)Vendor 62,123 0.06

    Ontario 230,001 0.23

    Franchise 429,429 0.43

    Fleet 2,080,000 2.08

    East 2,526,030 2.53

    Western 4,414,992 4.41

    Grand Total 9,742,574 9.74

    1,000,000

    The newly Calculated Field is now part of the Pivot Table Field List

    Volume ($MM) is not part of the database

    You now have all your Total Sales Volume divided by 1,000,000

    Notes and Observations

    To delete a Calculated Field from the Field List: Type the name of the Calculated Field to be deleted in Name select delete

  • 33 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.4. Calculated Fields

    4.4.2. Advanced Calculated Fields

    For this section, we need to add 2 more columns to our database:

    ROI* ANI NBM * ANI

    13418.3546 30756.6259

    76630.7536 139248.963

    12384.4515 24731.1975

    8547.91122 16023.7653

    8817.7662 14544.3388

    7739.69002 13845.5283

    8699.46237 14865.168

    8428.3846 14193.2205

    87419.9458 151976.972

    1072.73082 1833.1919

    7154.35608 14083.6574

    21749.7971 42009.949

    6640.65994 12455.6439

    2411.8879 4572.80296

    10101.7023 18319.9229

    10742.4788 20294.4465

    3268.39269 6143.35336

    28756.3546 47534.5211

    10509.3766 22906.0846

    20873.1086 43795.7319

    1738.40988 3742.93298

    7090.05012 13685.3355

    4855.15853 8360.45848

    51426.0729 94849.0628

    15554.2016 28687.4741

    4175.44748 7859.38985

    24517.668 46273.511

    3249.52963 5992.56846

    NBM*ANI = NBM as percentage * ANI

    ROI*ANI = ROI as percentage * ANI

    These 2 columns will allow us to calculate a weighted average for both ROI and NBM

    Simply choosing Calculation Type Average directly from the Pivot Table will not give us a weighted average

    A proper weighted average for a given Sub-Segment would be: SUM of ROI * ANI corresponding to the deals of the given Sub-Segment, divided by the SUM of

    ANI corresponding to the deals of the given Sub-Segment (ROI*ANI) / ANI

    A Calculated Field can calculate the weighted averages

    New Calculated Field

    The Calculated Field is the result of an operation on 2 existing Fields in the database

  • 34 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.4. Calculated Fields

    A) Result of the Calculated Field The Pivot Table summed the ROI * ANI for each Labels and divided them by the sum of ANI for each

    Labels

    Row Labels Sum of Total Sales Volume Sum of Weighted ROI Average of ROIVendor 62,123 2.32% 2.32%

    Ontario 230,001 2.08% 2.08%

    Franchise 429,429 3.09% 2.70%

    Fleet 2,080,000 2.17% 2.23%

    East 2,526,030 2.07% 1.99%

    Western 4,414,992 2.06% 2.04%

    Grand Total 9,742,574 2.13% 2.11%

    A) B)

    B) Result of the Calculation Type Average of ROI for each Labels The results are a simple average (sum of ROI / #) it is not as accurate as a weighted average 2.11% is relatively close to 2.13% the bigger the database will be the larger the gap between the

    weighted average and the simple average will be Both ROIs are equal for Vendor and Ontario because n=1

  • 35 /

    Best Practice Sharing

    4.5. Trouble Shooting

  • 36 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.8. Trouble Shooting

    4.8.2. Source Data Does Not Cover the Whole Database

    4.8.1. Refresh

    If you refresh a Pivot Table after having inputted a new database and you feel that the results are not what you expected make sure that the Source Data covers the entire database

    Dont forget to refresh (right click on the Pivot Table Refresh) the Pivot Table after modifying the database:

    Every time you input a new database into a template Every time you add a column in a database Every time you modify something in a database

    Source Data must cover the whole database for the data to be considered in the Pivot Table

    Notes and Observations

    What often happens is that databases get bigger as the year progresses To be safe, you can manually input a very large number of rows to the Source Data

    Databases!$A$2:$I$50,000 Empty rows will only appear as Blank

  • 37 /

    Best Practice Sharing

    Module 4: Pivot Tables

    4.8. Trouble Shooting

    4.8.3. Inserting a graph from a Pivot Table

    If you select a Pivot Table as a chart area in order to draw a graph, the result will not be efficient Excel has default Pivot Table graph format which are not very convenient

    To insert a graph using data from a Pivot Table it is preferable to link the data from the Pivot Table to a regular table in Excel

    You can insert formulas in the regular Excel table so it will refresh automatically once the Pivot Table is refreshed

    e.g.

    Pivot Table

    Formula automatically linking the values from the Pivot Table to the regular Excel table Corresponding

    graph Regular Excel Table containing the values you want to draw a graph from