Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 28

Data Management 102

Spring 2021
Talent Data Team
Agenda

● IF statements
● VLOOKUP Basics
● Building a PIVOT Table
Today’s Data Set

● Looking at data on CPS’s Student Teachers


● Each person has a tab with their own copy of the data set to work from
● I’ll explain a concept, and then you’ll have a task to practice with in your
own set
● Identifying information (Name, birthdate) has been randomized, so no
one’s actual information is being used
IF Statements and Logic
=IF() statements

An IF Statement allows you to


specify a logical argument, and
then populates the cell depending
on whether that argument is
TRUE or FALSE
Logical Expressions
Logical Expressions are expressions that return either “TRUE” or “FALSE”

Logical Expressions can compare a Logical Expressions can compare a


cell to a value cell to another cell
● Is the cell value greater than 2? ● Is A2 more than D2?
● Does the cell say “Richards ● Do cells A2 and E2 contain the
HS”? same text?
● Is the date in the cell after ● Is the date in B3 after the date
1/31/2020? in C3?
Logical Expressions Operators

= Is equal to

> Is greater than

< Is less than

>= Is greater than or equal to

<= Is less than or equal to

<> Is not equal to


When using text with a logical expression,
always put your text in “quotes”
Examples
The value in cell A2 is less than 4 A2 < 4

The text in cell B5 says “Lane Tech B5 = “Lane Tech HS”


HS”

The value in cell E4 is greater than or E4 >= G4


equal to the value in cell G4

The text in cell Z10 does NOT say Z10 <> “Hired”
“Hired”
IF Statements let you specify a value for if your logical expression returns TRUE, and a value for if it returns
FALSE

All arguments are separated by


commas

Put any text outputs in


“quotes”
Example

Value if TRUE Value if FALSE


Logical Expression
Example
Practice Task

If someone has a Program Affiliation other than “None”, identify that


person as a Priority Candidate in Column R

Hint:

First, write a logic expression to determine whether or not the Program Affiliation is “None”.

Then, choose a value or text that you’ll use to indicate priority status
VLOOKUP
What does VLOOKUP do?

“VLOOKUP” means “Vertical Lookup” - it searches vertically (in a


column) to find the first value that matches your cell, and then can
look horizontally (in the row) to return information for you

Think of it like looking up a definition in a dictionary - VLOOKUP


searches a column for the word you want to look up, then reads across
to retrieve the definition
VLOOKUP
Arguments

Search key: The cell whose value you want to search or match

Range: Where you want to look for new information

Index: How far over do we need to look?

Is_sorted: Is your data sorted so we can use the first close match?
Search Key Choose the cell that you want
to look up. You can type in
the cell code (letter and
number), or you can click on
it.

After you select your search


key, put a comma
You could type your range by hand,
but I find it’s better to navigate to
Range the range you want to search and
highlight the relevant columns.
Google Sheets will fill it into the
formula for you.

Your Range should start with the


whole column that will contain your
search key, and extend out to the
column with the value you want to
look up

After you select your range, put a


comma
What column number do you
want to pull your information
Index from?

The column containing your


search key will always be
column 1. Count over from
there until you reach the
column containing your new
information.

After you choose your index,


put a comma
is_sorted? You should type
false
for this parameter

This lets Google Sheets know if it


needs to search for an exact match, or
just the first close match it can find.

99% of the time, we want an exact


match
Practice Task 1

Use a VLOOKUP to look up each Student Teacher’s Placement School.

Use Dept ID as your search key. Your new information is located in the
“Dept IDs” tab.
Practice Task 2

Look up the hiring info for columns W through Y, using CPS Employee
Identification Number as the search key.
IFNA and IFERROR

You can surround your function with another function, either =IFNA() or
=IFERROR(), to avoid getting error statements if Sheets can’t find the value
you’re looking for

=IFNA( YOUR ENTIRE VLOOKUP FUNCTION HERE , Alternative value)

=IFERROR( YOUR ENTIRE VLOOKUP FUNCTION HERE , Alternative value)


PIVOT Tables
What are PIVOT Tables

PIVOT tables are a tool that will automatically summarize your data into a chart

You can filter a PIVOT table, select only certain values, change the values
you’re looking at, an adjust in all sorts of other ways right from the setup bar
PIVOT Components

Rows - You select a column that you Values - Google Sheets can summarize data in
want to pivot into rows. Google Sheets lots of different ways. You can fill in a PIVOT
table with counts, unique counts, sums,
will turn each value in that column into
averages, a max or min, or other summary
an individual row in your table
values
Columns - Similar to rows. You select a Filters - Select a column in your data set that
column from your data set, and Google you want to use to restrict the information
Sheets will turn each unique value into going into the pivot table. These work really
an individual column in your new PIVOT similarly to typical Google Sheets filtering
table
Practice Task

Create a PIVOT Table that lists how many unique Student Teachers
graduated from each EPP

Challenge: Can you separate it to show how many Master’s and


Bachelor’s students graduated from each EPP? (Hint: Use Columns!)

You might also like