Advanced
60 mins
Teacher/Student led
+65 XP
Pupils work on their own device

Pivot Tables: Summaries in Seconds

Build a pivot table from clean survey data to cross-tabulate two questions. Show counts and percentages of the grand total, try a filter, verify one figure with COUNTIF, and note your most interesting number.

Teacher Class Feed

Load previous activity

    1 - Introduction ~5 mins

    Illustration for IntroductionWith 24 answers, hand-counting transport by class is slow. What if you had 240?

    Today you build a pivot grid, show percentages, and spot-check one total with COUNTIF.

    By the end of this lesson, you will be able to:

    • Build a pivot with rows and columns
    • Show counts and % of grand total, and try a filter
    • Match one pivot total to a COUNTIF
    • Note the most interesting number on {{code:07_pivot}}

    Open {{code:02_survey_analysis}}. The guided build runs on a sample you paste in the next activity.

    2 - Key Concepts ~5 mins

    ConceptWhy it mattersExample
    Pivot table: summary grid from clean dataTwo questions cross-tabbed in secondsTransport × Class counts
    Row and column fields: the grid sidesSwapping fields changes the storyRows: Transport. Columns: Class
    % of grand total: each count as a share of allFairer when groups differ in size8 bus of 24 ≈ 33%
    Cross-check: match one pivot cell to COUNTIFProves the pivot read the data rightBus total = COUNTIF of Bus

    3 - Step-by-step Task: Build a Practice Pivot ~20 mins

    Guided build uses the on-screen sample only. You will make a Transport × Class pivot with counts and % of grand total, try a filter, and prove one total with COUNTIF. Save it as {{code:07_pivot_practice}}. The portfolio sheet, {{code:07_pivot}}, comes later.

    If the first grid looks empty or wrong, delete that sheet and recreate it. That is a two-minute fix, not a failure.

    Sample data (add a sheet named {{code:sample_data}} and paste this at {{cell:A1}}):

    Response	Class	Transport	Minutes	Cost_per_week	Would_cycle	Journey_rating
    1	TY1	Bus	25	12	Maybe	3
    2	TY1	Walk	10	0	No	4
    3	TY1	Car	15	0	Yes	3
    4	TY1	Bus	40	15	No	2
    5	TY1	Cycle	12	0	Yes	5
    6	TY1	Walk	8	0	No	5
    7	TY1	Train	45	25	No	2
    8	TY1	Car	20	0	Maybe	3
    9	TY2	Bus	30	12	Yes	2
    10	TY2	Walk	15	0	Maybe	4
    11	TY2	Bus	35	15	No	2
    12	TY2	Car	10	0	Yes	4
    13	TY2	Cycle	18	0	Yes	4
    14	TY2	Bus	20	10	Maybe	3
    15	TY2	Car	25	0	No	3
    16	TY2	Walk	5	0	No	5
    17	TY3	Bus	50	15	No	1
    18	TY3	Train	40	20	Maybe	2
    19	TY3	Car	12	0	Yes	4
    20	TY3	Walk	20	0	Maybe	3
    21	TY3	Bus	28	12	Yes	3
    22	TY3	Cycle	15	0	Yes	5
    23	TY3	Car	30	0	Maybe	2
    24	TY3	Bus	22	10	No	3

    4 - Common Issues ~3 mins

    Common Issues

    IssueSolution
    Empty pivot or one huge totalRecreate so the range includes every header and data row
    Sum of Response or inflated totalsSet Count (Excel Value Field Settings) or COUNTA (Sheets). Never sum IDs
    Percentages show as 0.33 not 33%Format as Percentage. Open the second Values field and set Show Values As / Show as to % of Grand Total
    COUNTIF does not match the pivotMatch spelling, use the real Transport column, and clear any filter first

    5 - Portfolio Build: 07_pivot ~17 mins

    Independent Practice

    Your goal: Build a portfolio pivot on two survey questions with counts, percentages, a filter trial, and a proven total.
    Time: ~15 minutes
    Task: Open {{code:02_survey_analysis}} in {{code:Digital_Spreadsheets}}. Then: (1) Use your own {{code:clean_data}} if you have ten or more answers; otherwise use the sample and note that on the sheet. (2) Rows and columns: two real survey questions, not Response ID. (3) Values: Count/COUNTA plus a second field as % of grand total (same move as practice). (4) Filter to one group, note which group, then clear the filter. (5) Run COUNTIF so it matches a visible grand total; add the why line. (6) Note the most interesting number. (7) Rename the sheet {{code:07_pivot}} (replace any old attempt). Keep {{code:07_pivot_practice}} as guided work.
    Success criteria:
    • Sheet {{code:07_pivot}} compares two real survey questions (not Response ID)
    • Values show counts and % of grand total
    • COUNTIF matches a grand total; filter cleared; a note names the group you filtered
    • A short note names the most interesting number and why it matters
    123learn · Online learning platform

    Unlock the full learning experience

    You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

    Hundreds of curriculum-aligned lessons
    Interactive activities in every lesson
    Printable resources & progress tracking
    Copyright Notice
    This lesson is copyright of Coding Ireland 2017 - 2025. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more