0% found this document useful (0 votes)
38 views86 pages

Mon Excel Skills For Data Exploration PSO 11

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views86 pages

Mon Excel Skills For Data Exploration PSO 11

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

Data Analytics For Business

Session 2
Common Excel Skills
for Data Exploration
2024.07
Quang-Khai Tran, Ph.D
Quang-Dao Tran, M.Sc
Ngoc-Thao Danh, MBA
Contents

I. Introduction to DA and Excel


II. Some Common Excel Functions
III. Visualizing data

2
Contents

I. Introduction to DA and Excel


II. Some Common Excel Functions
III. Visualizing data

3
Part I
Introduction 1. A Brief Introduction to DA
2. Overview of Excel

4
Review: What is Data Analytics

Data analytics is the process of analyzing raw data in order to draw out
meaningful, actionable insights
(Source: https://careerfoundry.com/en/blog/data-analytics/what-is-data-analytics/)

5
Review: What is Data Analytics

Typical Steps in a Data Analytics Project

Source: https://medium.com/codex/life-cycle-of-a-data-analytics-project-954d0e6926fe
6
Review: 04 Types (levels) of DA

Four Types (Levels) Of Data Analytics - Is a simple, surface-level type of analysis


based on historical data to examine,
understand, and describe what happened
Descriptive Analytics
- Uses BI and visualization tools to summarize
(Phân tích mô tả)
the data, or discover trends and patterns
- E.g.: Have the number of customers gone
up? Are sales better this month than last?
- Tries to uncover causal relationships
- May involve seeking to identify anomalies
Diagnostic Analytics
within the data
(Phân tích chẩn đoán)
- E.g.: Did the latest marketing campaign
impact sales?
- Is based-on historical data, past trends, and
Predictive Analytics
assumptions to predict future outcomes
(Phân tích dự đoán)
- Uses machine learning models
- Tries to find out and suggest what individuals
or organizations should do to obtain future
Prescriptive Analytics
targets/goals
(Phân tích đề nghị)
- Uses predictive analytics to show results of
different scenarios

Others: cognitive analytics, preemptive analytics, behavioral analytics, risk analytics...


7
Review: 03 Types of Knowledge from Data

(not only insights):


➤ Hindsight: ability to learn from the past.
➤ Insight: ability to understand and respond to what is happening at the present
➤ Foresight: ability to predict/forecast and prepare for the future

Source:https://www.linkedin.com/pulse/hindsight-insight-foresight-key-ingredients-effective-woods
8
Part I
Introduction 1. A Brief Introduction to DA
2. Overview of Excel

9
I. Introduction
2. Overview of Excel

➤ Excel is the leading spreadsheet software program


➤ A very powerful and easy-to-use data visualization & analysis tool

Source: Microsoft Excel Spreadsheet Software | Microsoft 365

10
An important part of the Microsoft BASE

Source: Microsoft Business Applications Solutions Ecosystem (2021 edition)


11
I. Introduction

➤ Some limitations (2023.01)

(2^20 by 2^14)

Source: Excel specifications and limits | Microsoft


12
I. Introduction
2. Overview of Excel

(from 2018)

Source: Excel vs. Google Sheets usage — nature and numbers | by Hjalmar Gislason

13
I. Introduction
2. Overview of Excel

CSV file:

➤ A file format: Comma Separated Value


➤ Data is presented in tabular format
➤ Is just a text file (like .txt)
➤ Almost no limitation in numbers of rows
and columns

.CSV files can be manipulated and analyzed


using functions and features in Excel
14
I. Introduction
2. Overview of Excel

CSV file:

➤ Open .csv file safely

15
I. Introduction
2. Overview of Excel

CSV file: compared to .xlsx (Excel file)

(and Excel)

Source: What are the differences between an Excel file and a CSV file?
16
I. Introduction
2. Overview of Excel

➤ 10 Recommended Excel Functions for data analytics:

Link: https://careerfoundry.com/en/blog/data-analytics/data-analysis-in-excel 17
I. Introduction
2. Overview of Excel

➤ All Excel Functions:


Link: Excel functions (by category) | Microsoft

18
I. Introduction
2. Overview of Excel

➤ A very good source for learning Excel

Link: https://www.excel-easy.com/

Facebook: Excel Easy | Facebook

19
Contents

I. Introduction to DA and Excel


II. Some Common Excel Functions
III. Visualizing data

20
Part II
Some Common 1. Filtering & Sorting

Excel Skills 2. Describing & Summarizing


3. VLOOKUP/HLOOKUP
(For Exploratory Data Analysis) 4. PivotTable

21
Important Note: decimal format

1
.
“ ” for decimal

2
II. Some Common Excel Skills

Example: Sale data

- 02 sheets
- Main data: 1000 rows x 11 columns
- Products: 6 product lines

23
Important Note: data types

Quantitative:
● discrete (rời rạc)
● continuous (liên tục)
● interval (khoảng)
⇒ structured data

Qualitative:
● nominal (định danh)
● binary (định danh True/False)
● ordinal (thứ tự)
⇒ unstructured data
(text, category, datetime)

Source: https://www.intellspot.com/data-types/
24
II. Some Common Excel Skills

Example: Sale data

UNIQUE() COUNTIF() SUMIF() SUMIFS() AVERAGEIF()


Functions

Unique-City Count Sum of Order-1 Sum of Order-2 Average

Ha Noi 273 85424.15 85424.15 312.91

Categories HCM City 517 170393.03 170393.03 329.58

Da Nang 210 67149.57 67149.57 319.76

25
Part II
Some Common 1. Filtering & Sorting

Excel Skills 2. Describing & Summarizing


3. VLOOKUP/HLOOKUP
(For Exploratory Data Analysis) 4. PivotTable

26
II. Some Common Excel Skills
1. Filtering & Sorting

Filter the data

1. Select columns
2. Home > Editing > Sort & Filter > Filter
(or Data > Sort & Filter > Filter)

27
II. Some Common Excel Skills
1. Filtering & Sorting

Filter the data

Using "FILTER" function to filter a range of data based on criteria

➤ Example: find transactions related


to "Apple" (in cell H2)
➤ Formula:
=FILTER(A5:D20,C5:C20=H2,"")

(Note: no header included)

Reference: FILTER function | Excel

28
II. Some Common Excel Skills
1. Filtering & Sorting

➤ Example: find all transactions in Ha Noi


➤ Formula: =FILTER(data!$A$2:$O$1001, data!C2:C1001=Sheet1!B1, "N/A")

29
II. Some Common Excel Skills
1. Filtering & Sorting

➤ Further tip: Create a Drop-down menu with Data Validation for filtered data

Drop-down menu for City

Unique
values of
City
column

30
II. Some Common Excel Skills
1. Filtering & Sorting

➤ Filter with multiple conditions


DATA > Sort & Filter >Advanced

31
II. Some Common Excel Skills
1. Filtering & Sorting

➤ Practice: find all transactions


● Normal customer type
● Female
● Living in Ha Noi

32
II. Some Common Excel Skills
1. Filtering & Sorting

Sort the data

1. Select a column or choose one cell in that column


2. Home > Editing > Sort & Filter > Sort A to Z (or Sort Z to A)
(or Data > Sort & Filter > Sort A to Z (or Sort Z to A))

Sort other columns too

Sort only the selected column


33
II. Some Common Excel Skills
1. Filtering & Sorting

Sort the data

Using "SORT" function to sort data based on given criteria

➤ Example: sort by Region (column A)


➤ Formula: =SORT(A2:A17)

(Note: no header included)

Reference: SORT function | Excel

34
II. Some Common Excel Skills
1. Filtering & Sorting

➤ Example: Sort sales data by column InvoiceID


1: Ascending, or
➤ Formula: =SORT(A2:J1001, 1, 1) -1: Descending

35
II. Some Common Excel Skills
1. Filtering & Sorting

➤ Example: Combine SORT and FILTER to filter orders that are higher than 1000,
then sort by City

➤ Formula: =SORT(FILTER(A2:J1001, J2:J1001 > Q2, ""), 2, 1)

36
Part II
Some Common 1. Filtering & Sorting

Excel Skills 2. Describing & Summarizing


3. VLOOKUP/HLOOKUP
(For Exploratory Data Analysis) 4. PivotTable

37
II. Some Common Excel Skills
2. Describe & Summarize

Get unique values from a Column or Row

=UNIQUE(array, [by_col], [exactly_once])

by_col = TRUE

by_col = FALSE

38
II. Some Common Excel Skills
2. Describe & Summarize

Count and Find Unique Values

=COUNTA(range or formula)
=UNIQUE(range)

Example

=COUNTA(UNIQUE(C2:C1001))

39
II. Some Common Excel Skills
2. Describe & Summarize

Count number of occurrences by condition

=COUNTIF(range, criteria)

=COUNTIF(Where do you want to look?, What do you want to look for?)

Reference: COUNTIF function - Microsoft Support

40
II. Some Common Excel Skills
2. Describe & Summarize

Calculating SUM of categories

=SUMIF(range, criteria, sum_range)

Reference: https://www.excel-easy.com/examples/sumif.html

41
II. Some Common Excel Skills
2. Describe & Summarize

Calculating SUM of categories

=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2],)

Source: https://blog.hocexcel.online
42
II. Some Common Excel Skills
2. Describe & Summarize

Calculating AVERAGE of categories

=AVERAGEIF(range, criteria, avg_range)

=AVERAGEIFS(avg_range, criteria_range1, criteria1, [criteria_range2, criteria2],)

Reference: https://www.excel-easy.com/examples/averageif.html
43
II. Some Common Excel Skills
2. Describe & Summarize

Summarize the Value of Orders

Which ones are you


familiar with?

44
Part II
Some Common 1. Filtering & Sorting

Excel Skills 2. Describing & Summarizing


3. VLOOKUP/HLOOKUP
(For Exploratory Data Analysis) 4. PivotTable

45
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

➤ VLOOKUP is one of the most widely used Excel functions

Link (if you want to buy): https://www.amazon.ca/EXCEL-VLOOKUP-FORMULA-NINJA-Straightforward/dp/B089D35SCL

46
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

➤ VLOOKUP finds values in a table or a range by row:


1. Looks up a value in a column on the left
2. Returns a value in a column to the right
(See: VLOOKUP function | Microsoft)

Source: https://www.extendoffice.com/documents/excel/6393-excel-vlookup-function.html
47
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

Syntax must be in the first column of

=VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])

If 1 or TRUE
Search for the
closest value

Source: https://www.extendoffice.com/documents/excel/6393-excel-vlookup-function.html
48
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

➤ HLOOKUP is similar to VLOOKUP, but works for the horizontal direction


1. Looks in the top row of an array
2. Returns the value of cells in the below rows
(See: HLOOKUP function | Microsoft)

Example

Source: https://www.techonthenet.com/excel/formulas/hlookup.php
49
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

➤ LOOKUP: a general version of both VLOOKUP and HLOOKUP


1. Look in a single row or column and find a value from the same position in a second
row or column
2. VLOOKUP and HLOOKUP are strongly recommended instead
3. VLOOKUP is a much improved version for vertical searching
(See: LOOKUP function | Microsoft)

Source: www.ablebits.com/office-addins-blog/excel-lookup-function/ 50
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

How to look up for a value on the left column (rather on the right)?

51
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

➤ XLOOKUP: If you are using Microsoft 365, use XLOOKUP


1. It is FASTER
2. It is MORE FLEXIBLE: search in any direction (up, down, left, right).
(See: XLOOKUP function | Microsoft)

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found],


[match_mode], [search_mode])

52
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

➤ XLOOKUP: See: XLOOKUP function | Microsoft


=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found],
[match_mode], [search_mode])

[if_not_found] Where a valid match is not found, return the [if_not_found] text you supply.
Optional If a valid match is not found, and [if_not_found] is missing, #N/A is returned.
Specify the match type:
● 0 - Exact match. If none found, return #N/A. This is the default.
[match_mode] ● -1 - Exact match. If none found, return the next smaller item.
Optional ● 1 - Exact match. If none found, return the next larger item.
● 2 - A wildcard match where *, ?, and ~ have special meaning.
Specify the search mode to use:
● 1 - Search starting at the first item. This is the default.
● -1 - Reverse search starting at the last item.
[search_mode] ● 2 - Binary search that relies on lookup_array being sorted in ascending
Optional order. If not sorted, invalid results will be returned.
● -2 - Perform a binary search that relies on lookup_array being sorted in
descending order. If not sorted, invalid results will be returned.

53
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

Look up in another sheet

54
II. Some Common Excel Skills
3. VLOOKUP/HLOOKUP

Look up in another workbook (file)

⇒ Specify file-name/file-path explicitly. Example:

Reference: How to vlookup to another workbook? | ExtendOffice

55
Part II
Some Common 1. Filtering & Sorting

Excel Skills 2. Describing & Summarizing


3. VLOOKUP/HLOOKUP
(For Exploratory Data Analysis) 4. PivotTable

56
II. Some Common Excel Skills
4. PivotTable

➤ "A powerful tool to calculate, summarize, and analyze data"


➤ Help us quickly make comparisons, find patterns and trends.
➤ A notice from Microsoft: it can be a little different in Windows, Web, and MacOS

Reference: Create a PivotTable to analyze worksheet data | Microsoft


57
II. Some Common Excel Skills
4. PivotTable

Example:

➤ Quickly calculate Sum, Average for different categories


➤ Make a slicer for choosing filter (Female or Male)

58
II. Some Common Excel Skills
4. PivotTable

Create a PivotTable:

1. Insert > PivotTable


Insert > Recommended PivotTables
2. Select data range
3. Choose location

1
3

59
II. Some Common Excel Skills
4. PivotTable

Some operations:

➤ Choosing Columns, Rows, Values


➤ Adding Filters
➤ Sorting
➤ Adding slicer
fields can be
dragged and
dropped into the
corresponding
areas

60
II. Some Common Excel Skills
4. PivotTable

Some operations:

➤ Changing summary calculation


For example: Average

Average

61
II. Some Common Excel Skills
4. PivotTable

There can be some "annoying" blank rows or columns

➤ The reason is blank cells


➤ Should specify the range in detail

62
Contents

I. Introduction to DA and Excel


II. Some Common Excel Functions
III. Visualizing data

63
Part III
1. Introduction
Visualizing data 2. Five basic charts
3. Using Pivot Charts

64
III Visualizing data
1. Introduction

Data visualization: representation of data in graphical or pictorial format

Source: Matplotlib (https://matplotlib.org/)


65
III Visualizing data
1. Introduction

Why is data visualization


helpful (and interesting)?

66
III Visualizing data
1. Introduction

"A Picture Is Worth A Thousand Words"


(since 1910s, see Wikipedia)

Source: https://www.youtube.com/watch?v=GpP0EbSMRpg&ab_channel=LeilaGharani

67
III Visualizing data
1. Introduction

Example

Source: https://boostlabs.com/blog/10-types-of-data-visualization-tools/
68
III Visualizing data
1. Introduction

Source: https://www.ataccama.com/platform/data-stories
69
III Visualizing data
1. Introduction

Bar/Column Histogram Scatter Line/Area Pie

70
Part III
1. Introduction
Visualizing data 2. Five basic charts
3. Using Pivot Charts

71
III Visualizing data
2. Five basic charts: Line Chart & Area Chart

When to use line chart or area chart?

➤ Line charts show trends over time


➤ Area chart is similar to line chart, but the area under each line is colored (or shaded)
➤ Both are usually used when x-labels are date/time or texts

72
III Visualizing data
2. Five basic charts: Line Chart & Area Chart

There are several types of area charts:

➤ Normal area chart


➤ Stacked area chart: elements are added at each label point
➤ 100% stacked area chart: elements are added up to 100%

Source: https://www.exceltip.com/tips/the-area-chart-in-excel.html

73
III Visualizing data
2. Five basic charts: Bar Chart & Column Chart

When to use column chart or bar chart?

➤ To compare the values of different categories


➤ Column chart: uses vertical columns
➤ Bar chart: is a horizontal version of column chart
⇒ Usually used when the label is a long text
➤ Note: the order of categories is not important

74
III Visualizing data
2. Five basic charts: Bar Chart & Column Chart

Group bar chart/column chart: example

75
III Visualizing data
2. Five basic charts: Bar Chart & Column Chart

Stacked bar chart/column chart: example

76
III Visualizing data
2. Five basic charts: Pie Chart & Donut Chart

➤ Pie chart shows proportion of categories (slices) to a total (the pie)


➤ Donut chart is just a version of pie chart

77
III Visualizing data
2. Five basic charts: Scatter Chart

➤ Shows relationship between 02 variables X and Y


➤ Usually used to investigate the correlation or trend
➤ Or to discover groups

78
III Visualizing data
2. Five basic charts: Scatter Chart

➤ Shows relationship between 02 variables X and Y


➤ Usually used to investigate the correlation or trend
➤ Or to discover groups

79
III Visualizing data
2. Five basic charts: Histogram Chart

➤ Shows the distribution of (numeric) data


➤ Notes:
● Only ONE category
● The data will be divided into many
bins (sub-categories)
➤ Can show frequency or ratio (probability)

80
III Visualizing data
Further applications

Distribution network - Sankey P&L - Waterfall

Sales by region - Heatmap Disruption scenario - Bubble


Sources: https://www.cel-consulting.com/distribution-network
https://www.eloquens.com/tool/E1kKFxyD/strategy/waterfall-chart-excel-templates/waterfall-charts-excel-model-with-linked-p-l-budget
https://www.excel-university.com/geographic-heat-map/
III Visualizing data
Further applications

Sparkline Hexagon grid map

Source: Jonathan Schwabish


Part III
1. Introduction
Visualizing data 2. Five basic charts
3. Using Pivot Charts

83
III Visualizing data
3. Using PivotCharts

Adding PivotChart (1): from data table

1. Select any cell inside the data table


2. Choose Insert > PivotChart
3. Select table or range (Reference: Create a PivotChart | Microsoft )

84
III Visualizing data
3. Using PivotCharts

Adding PivotChart (2): from an existing PivotTable

1. Select any cell inside the PivotTable


2. Choose PivotTable Analyze > PivotChart
3. Choose Chart Type
(Reference: https://www.excel-easy.com/examples/pivot-chart.html)

85
Thank you!

86

You might also like