BUA 345 - Lecture 4
Descriptive Analytics with Pivot Tables
Housekeeping
HW 2 is due Monday, 1/26/26
Demo videos for HW 2 are posted
Today’s plan
- Descriptive Analytics
- Pivot tables
- Summarizing data in Tables
- Summarizing data ‘On the Fly’ with Slicers
- HW 2 Demo
- R and R/Studio Resources for BUA 345
Lecture 4 In-class Exercise - Q1
Poll Everywhere - My User Name: penelopepoolereisenbies685
Download the
Lecture 4 Review Question Data.xlsxdataset 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
Pricefrom ‘Largest to Smallest’Use the first
indicatoricon set to classifyPRICEinConditional Formatting.
What is the lowest price in the ‘High’ (green checkmark) category?
- Round answer to closest thousand to select correct choice.
Descriptive Statistics
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.
Introduction to Pivot Tables
- When you click
Summarize with PivotTable, you will see this pop-up which should be populated as follows:
Specify `Existing Worksheet.
Specify
G1for the location.
Answering Questions with Pivot Tables
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?
Pivot Table Questions
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
DAYto theRowsfield.Drag
GROSStoValuescolumnRight click on a data value in the table and change ‘Summarize Values By’ to
Average.
Lecture 4 In-class Exercise - Q2
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.
Lecture 4 In-class Exercise - Q3
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.
Filtering Pivot Tables
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
MONTHto theRowsfield.Drag
GROSSto theValuesfield.Click on any cell in the pivot table so that the
PivotTable Analyzemenu appears.
Lecture 4 In-class Exercise - Q4
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.
Lecture 4 In-class Exercise - Q5
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.
Counts and Percents in Pivot Tables
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.
Counts and Percents Cont’d
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
- Note that other text columns would also work in the
Valuesfield
- Note that other text columns would also work in the
Countshows 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.
Lecture 4 In-class Exercise - Q6
How many diamonds in this dataset are classified as Colorless with Slight Inclusions?
Counts to Percents
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 Totalto 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)
Lecture 4 In-class Exercise - Q7
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.
Changing Percents from Column to Row
We can easily convert percentages without changing the pivot table.
We want want to know what percent of diamonds with
Slight inclusionsareNear colorless.
Right-click on any value in the table.
In ‘Show Values As’ change
% of Column Totalto% of Row TotalExamine the table to confirm that it is correctly set up to answer our question.
Lecture 4 In-class Exercise - Q8
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.
Demonstrations
HW 2 Demo
A short demo of some key aspects of HW Assignment 2
R/Rstudio Demo using Posit Cloud
Preview of the R and RStudio environment using Posit Cloud.
This requires that you create free a Posit Cloud account.
Key Points from Today
Pivot Tables
- Very effective for summarizing categorical data
- Efficient once you get used to using them
Pivot Tables with Slicers
- Useful for ‘On the Fly’ subsets and toggling between groups
Caution
- Sometimes filtering within the table and then filtering using slicers in a pivot table can cause conflicts. Use one or the other.
- When in doubt, clear all previous filters and clear all fields on the Pivot Table.
- Resetting the Pivot Table is the quickest way to resolve an error.
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).