Descriptive Analytics with Pivot Tables
2026-01-21
HW 2 is due Monday, 1/26/26
Demo videos for HW 2 are posted
Poll Everywhere - My User Name: penelopepoolereisenbies685
Download the Lecture 4 Review Question Data.xlsx dataset to your BUA 345 folder and open it.
Convert these data to an Excel table.
Remove Duplicates using all columns except OBS NO..
Sort data by Price from ‘Largest to Smallest’
Use the first indicator icon set to classify PRICE in Conditional Formatting.
What is the lowest price in the ‘High’ (green checkmark) category?
Describing and summarizing data quickly is an essential skill.
Excel has a powerful set of tools for this purpose, Pivot Tables.
To Access these tools:
Convert our 2025 Movie Data to an Excel Table (Insert > Table)
Click any cell within table, so that ‘Table Design’ tab is visible.
Click Summarize with PivotTable.
Summarize with PivotTable, you will see this pop-up which should be populated as follows:Specify `Existing Worksheet.
Specify G1 for the location.
Here a few examples of the many questions we can answer:
What was the average of of the GROSS (ticket sales) for each day of the week?
What was the minimum of the GROSS (ticket sales) for each day of the week?
What was the total gross in the last two months of the year?
Which day and month had the highest maximum GROSS?
What was the average of of the GROSS (ticket sales) for each day of the week?
Pivot tables allow you to drag and drop variables, and move data around efficiently
There’s no one right way to answer a question but here is one solution:
Drag DAY to the Rows field.
Drag GROSS to Values column
Right click on a data value in the table and change ‘Summarize Values By’ to Average.
What was the average gross movie sales in the United States on Fridays in 2025?
Round answer to closest million.
The average gross movie sales on Fridays in the United States was ____ million.
Using the framework for the summary in Question 2, we can easily find the minimum or maximum for each weekday as well.
Which day had the lowest minimum gross sales in the United States in 2025?
When you are done with this question, clear your pivot table fields by unchecking the boxes in the field list.
A useful quick tool for modifying a pivot table is a slicer.
For example, we want to create a table of the total gross for the last two months on 2025.
Drag MONTH to the Rows field.
Drag GROSS to the Values field.
Click on any cell in the pivot table so that the PivotTable Analyze menu appears.
What is the approximate total movie gross for the last two months of the 2025 in the united states?
Round to the closest million, e.g. 453 million.
___ million dollars
When you are done, clear the slicer filter, select the slicer menu, and delete it.
Which day in which month had the highest maximum gross sales in the United States?
The highest maximum gross sales in the United States occured on ___(day of week) in ___ (month).
When you are done, clear the slicer filter, select the slicer menu, and delete it.
In HW 2 you will examine 3 different sets of data about diamonds.
The next two examples are similar to Question 3 and Question 4 in HW 2.
The point of these examples is to show you how to
count the number of observations by categories.
convert counts to percentages.
make simple changes to answer different questions.
We want to know how many diamonds in this dataset are classified as Colorless with Slight Inclusions.
Convert the Diamonds Data (Worksheet 2) to a table (Insert > Table)
Create a pivot table as shown
Values fieldCount shows the number of observations in each Color/Clarity combination.
NOTE: It is also helpful to center the columns to make the table easier to read.
How many diamonds in this dataset are classified as Colorless with Slight Inclusions?
After creating a table of counts, we can convert counts to other useful values to answer questions.
There are multiple ways to these same options.
One simple way:
Right-Click on any value within Pivot Table
Select ‘Show Values As’
Select option to answer your question
In the example table, we select % of Column Total to answer this question because of how the table is oriented.
Question: What percent of Colorless diamonds have Slight inclusions? (Similar to Questions 3 and 4 in HW 2)
What percent of Colorless diamonds have Slight inclusions?
Round answer to one decimal place.
See instructions on previous slide to convert counts to column percents.
We can easily convert percentages without changing the pivot table.
We want want to know what percent of diamonds with Slight inclusions are Near colorless.
Right-click on any value in the table.
In ‘Show Values As’ change % of Column Total to % of Row Total
Examine the table to confirm that it is correctly set up to answer our question.
What percent of diamonds with Slight inclusions are Near colorless?
Round answer to one decimal place.
See instructions on previous slide to convert column percents to row percents or vice versa.
A short demo of some key aspects of HW Assignment 2
Preview of the R and RStudio environment using Posit Cloud.
This requires that you create free a Posit Cloud account.
Pivot Tables
Pivot Tables with Slicers
Caution
HW 2 is due Monday, 1/26/26
To submit an Engagement Question or Comment about material from Lecture 4: Submit it by midnight today (day of lecture).