Filtering data

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Filtering data

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does a filter do to the rows in a table?
A Shows only the rows that match the value you choose
B Deletes the rows that do not match
2. You filter a Pet column to show only 'Dog'. What happens to the rows with 'Cat'?
A They are hidden but not deleted
B They are deleted forever
3. Which step comes first when you want to filter your data?
A Turn on the filter buttons for the headings
B Clear the filter
4. Where do the filter buttons usually appear?
A Inside every single cell
B Next to the column headings
5. You click a filter button on the Year column and tick only '5'. What will you see?
A All of the rows, with Year 5 in bold
B Only the rows where Year is 5

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Filter button AYou must turn on the filter buttons in the heading row first. Without them there is no drop-down arrow to choose a value.
2Clear filter BFilter menu: Clear Filter from Pets
3Choose a value to show only the rows that match it CTurns on drop-down arrows in the heading row so you can choose which rows to show
4Hidden rows are not deleted, so removing the filter brings them back DPets column: tick only "Dog"
5Filter the Pets column by Dog, then delete the hidden rows to clear the filter EShows all the hidden rows again
6Click a cell in an empty column and tick "Cat" to filter without turning on filter buttons FDeleting rows does not clear a filter and it removes data for good. You should use Clear Filter to bring the hidden rows back.

Definitions

filter

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
filter.__(A1:C10)
2.
filter.on(A1:C10) filter.______("Pet", "Dog")
3.
filter.on(A1:C10) filter.choose("Pet", "Dog") filter._____()
4.
show rows _____ Pet = "Dog"
5.
filter.choose("Pet", "Dog") rowsDeleted = _____

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A Table columns: Pet, Name, Age
B Turn on the filter buttons
C Click the Age button, pick Dog
D Only the Dog rows show
Question 2
A Turn on the filter buttons
B Click the Colour button
C Choose Red from the list
D Non-Red rows are deleted
Question 3
A Turn off the filter buttons
B Click the Year button
C Choose 5 from the list
D Only Year 5 rows show
Question 4
A Click a cell in the table
B Turn on the chart buttons
C Click the Team button
D Choose Blue from the list
Question 5
A Click the City sort button
B Choose Perth from the list
C Only Perth rows are shown
D Other rows are hidden

Answer Key

Filtering data
Section A: Quick Questions
Q1
A — Shows only the rows that match the value you choose
Q2
A — They are hidden but not deleted
Q3
A — Turn on the filter buttons for the headings
Q4
B — Next to the column headings
Q5
B — Only the rows where Year is 5
Section B: Match the Pairs
Q1
Filter button → Turns on drop-down arrows in the heading row so you can choose which rows to show
Q2
Clear filter → Shows all the hidden rows again
Q3
Choose a value to show only the rows that match it → Pets column: tick only "Dog"
Q4
Hidden rows are not deleted, so removing the filter brings them back → Filter menu: Clear Filter from Pets
Q5
Filter the Pets column by Dog, then delete the hidden rows to clear the filter → Deleting rows does not clear a filter and it removes data for good. You should use Clear Filter to bring the hidden rows back.
Q6
Click a cell in an empty column and tick "Cat" to filter without turning on filter buttons → You must turn on the filter buttons in the heading row first. Without them there is no drop-down arrow to choose a value.
Section C: Definitions
Q1
filter — A filter shows only the rows that match a value you choose and hides the other rows. The hidden rows are not deleted. Clear the filter to see them all again.
Section D: Fill in the Blanks
Q1
filter.on(A1:C10)
Q2
filter.on(A1:C10) filter.choose("Pet", "Dog")
Q3
filter.on(A1:C10) filter.choose("Pet", "Dog") filter.clear()
Q4
show rows where Pet = "Dog"
Q5
filter.choose("Pet", "Dog") rowsDeleted = false
Section E: Spot the Error
Q1
C — Dog is a value in the Pet column, so you must click the Pet filter button. The line should be: Click the Pet button, pick Dog.
Q2
D — A filter hides the rows that do not match. It does not delete them. The line should say the rows are hidden.
Q3
A — You need to turn ON the filter buttons before you can choose a value to filter by. The line should be: Turn on the filter buttons.
Q4
B — Filtering uses filter buttons on the heading row, not chart buttons. The line should be: Turn on the filter buttons.
Q5
A — A sort button puts rows in order. It does not hide any rows. To show only Perth you need the filter button.