Course Material Tableau
Course Material Tableau
Too simple?
Use a snapshot of
Single file contains data Create a chart
the chart in report
Start-Tech Academy
Data Visualization Process
• Data is in multiple files
Start-Tech Academy
Data Visualization Process
Practical
challenges Multiple data sources Steps Dynamic & Interactive
1. Connect with data sources dashboard
2. Collate and prepare data
3. Draw all types of charts Share, Embed & View
4. Customize the charts
Collaborate
Start-Tech Academy
Tableau Products
Tableau Desktop
Tableau Desktop
Tableau Public
Start-Tech Academy
Tableau Products
Tableau Prep
Tableau Desktop
Tableau Public
Start-Tech Academy
Tableau Products
Tableau Server/ Tableau Online
Tableau Desktop
• Used for connecting and collaborating with team members
Tableau Server
Tableau Desktop will talk with
Tableau server via Intranet
Tableau Online
Start-Tech Academy
Tableau Products
Tableau Server/ Tableau Online
Tableau Desktop
• Used for connecting and collaborating with team members
Tableau Server
Tableau Desktop will talk with
Tableau Online via Internet
Tableau Online
Tableau Public
Start-Tech Academy
Tableau Products
Tableau Public
Tableau Desktop
Tableau Public
Start-Tech Academy
Live vs Extract Connection
Start-Tech Academy
Joining data from multiple tables
Sales Table
Sales values only
Order Line Order ID Order Date Ship Date Ship Mode Customer ID Product ID Sales Quantity Discount Profit
1 CA-2016-152156 08-11-2016 11-11-2016 Second Class CG-12520 FUR-BO-10001798 261.96 2 0 41.9136
Scenario 1: 2
3
4
CA-2016-152156
CA-2016-138688
US-2015-108966
08-11-2016
12-06-2016
11-10-2015
11-11-2016
16-06-2016
18-10-2015
Second Class
Second Class
Standard Class
CG-12520
DV-13045
SO-20335
FUR-CH-10000454
OFF-LA-10000240
FUR-TA-10000577
731.94
14.62
957.5775
3
2
5
0
0
219.582
6.8714
0.45 -383.031
Joining two 5 US-2015-108966 11-10-2015 18-10-2015 Standard Class SO-20335 OFF-ST-10000760 22.368 2 0.2 2.5164
different tables
Customer Table
Region values only
Customer ID Customer Name Segment Age Country City State Postal Code Region
CG-12520 Claire Gute Consumer 67 United States Henderson Kentucky 42420 South
DV-13045 Darrin Van Huff Corporate 31 United States Los Angeles California 90036 West
SO-20335 Sean O'Donnell Consumer 65 United States Fort Lauderdale Florida 33311 South
BH-11710 Brosina Hoffman Consumer 20 United States Los Angeles California 90032 West
3 ways of joining data in tableau
Later
Scenario 2: Customer ID Customer Name Segment Age Country City State Postal Code Region
ON-18715 Odella Nelson Corporate 27 United States Eagan Minnesota 55122 Central
Offline
Merging similar PO-18865 Patrick O'Donnell
LH-16900 Lena Hernandez
Consumer 64 United States
Consumer 66 United States
Westland
Dover
Michigan
Delaware
48185
19901
Central
East customers
tables
Customer ID Customer Name Segment Age Country City State Postal Code Region
EB-13870 Emily Burns Consumer 34 United States Orem Utah 84057 West
EH-13945 Eric Hoffmann Consumer 21 United States Los Angeles California 90049 West
TB-21520 Tracy Blumstein Consumer 48 United States Philadelphia Pennsylvania 19140 East
MA-17560 Matt Abelman Home Office 19 United States Houston Texas 77095 Central
ON-18715 Odella Nelson Corporate 27 United States Eagan Minnesota 55122 Central
PO-18865 Patrick O'Donnell Consumer 64 United States Westland Michigan 48185 Central
LH-16900 Lena Hernandez Consumer 66 United States Dover Delaware 19901 East
Joins
To join tables we must know:
Order Line Order ID Order Date Ship Date Ship Mode Customer ID Product ID Sales Quantity Discount Profit
What’s needed 1
2
CA-2016-152156
CA-2016-152156
08-11-2016
08-11-2016
11-11-2016
11-11-2016
Second Class
Second Class
CG-12520
CG-12520
FUR-BO-10001798
FUR-CH-10000454
261.96
731.94
2
3
0
0
41.9136
219.582
3 CA-2016-138688 12-06-2016 16-06-2016 Second Class DV-13045 OFF-LA-10000240 14.62 2 0 6.8714
4 US-2015-108966 11-10-2015 18-10-2015 Standard Class SO-20335 FUR-TA-10000577 957.5775 5 0.45 -383.031
5 US-2015-108966 11-10-2015 18-10-2015 Standard Class SO-20335 OFF-ST-10000760 22.368 2 0.2 2.5164
Customer ID Customer Name Segment Age Country City State Postal Code Region
CG-12520 Claire Gute Consumer 67 United States Henderson Kentucky 42420 South
DV-13045 Darrin Van Huff Corporate 31 United States Los Angeles California 90036 West
SO-20335 Sean O'Donnell Consumer 65 United States Fort Lauderdale Florida 33311 South
BH-11710 Brosina Hoffman Consumer 20 United States Los Angeles California 90032 West
Relationship – performance options
Customer table Postal code master table
‘Many to One’
We are joining customer table with postal code master - postal code is the matching key
Start-Tech Academy
Relationship – performance options
Customer table Reference table
‘One to Many’
We are joining customer table with reference table – customer ID is the matching key
Start-Tech Academy
Relationship – performance options
Start-Tech Academy
Relationship – performance options
Customer table Reference table
Integrity customer table also present Are all customer IDs in reference table
in the reference table? also present in the customer table?
We are joining customer table with reference table – customer ID is the matching key
Start-Tech Academy
Relationship – performance options
Start-Tech Academy
Physical vs Logical layer
Observations
• We can do Join and Union here • Single logical table can have multiple
joined and Union tables
• Result of joining and union is a single
table • Relationships can be defined – ‘Noodles
Start-Tech Academy
Physical vs Logical layer
Data Model - Example
Start-Tech Academy
Physical vs Logical layer
Data Model
Start-Tech Academy
Types of Data in Tableau
Student ID Gender Age Hours studied Marks scored Year of exam
S101 Male 19 18 73 2021
S102 Female 20 15 85 2020
S103 Female 16 21 71 2023
S104 Male 19 23 89 2022
Dimensions vs measures S105 Female 19 25 94 2022
S106 Female 20 27 70 2020
• Dimensions are columns containing S107 Male 21 15 95 2019
categories/ segments based on S108 Male 21 20 70 2021
S109 Female 16 17 79 2019
which aggregation will be done S110 Female 18 26 73 2020
… … … … … …
• Measures are numeric columns for
which we wish to get the aggregate Gender Sum of Hours studied Year of Exam Average of Marks scored
values Female 131 2019 87
Male 76 2020 76
2021 71.5
2022 91.5
2023 71
Start-Tech Academy
Types of Data in Tableau
Discrete vs continuous
Age is set as
continuous
Start-Tech Academy
Types of Data in Tableau
Discrete Continuous
(Blue) (Green)
Finite – adds headers Infinite range – adds axes
Start-Tech Academy
Binning data
Converting continuous numeric data into bins/ groups
Age
18
19
: Young
Bins :
39
40
41
: Middle Aged
:
64
65
66
:
Seniors
:
Start-Tech Academy
Grouping data
Clubbing similar categories together into groups
Sub-categories
Phones Phones & Acc.
Accessories Accessories
Appliances
Bookcases Tables Tables & Chairs
Chairs Chairs
Groups Copiers
Envelopes Appliances
Furnishings Bookcases
Labels Copiers
Machines Envelopes
Paper Furnishings Others
Phones Labels
Storage Machines
Tables Paper
Storage
Start-Tech Academy
Filtering
Showing only relevant data/ hiding irrelevant information
Examples
Start-Tech Academy
Filters
Order of 1.
2.
Extract filters
Data source filters
operation 3. Context filters
4. Filters on dimensions
5. Filters on measures
Start-Tech Academy
Filters
Start-Tech Academy
Filters
Custom
background
image
Start-Tech Academy
Maps
50
45
40
35
30
25
Custom 20
background 15
10
image 5
0
0 10 20 30 40 50 60 70 80 90 100
State X coordinate Y coordinate
California 13 26
New York 84 34
Texas 50 10
Start-Tech Academy
Maps
Territory States
Start-Tech Academy
Blending for missing geocoding
Types of functions:
1. Number functions
2. Date functions
Functions 3. Text functions
4. Logical functions
5. Aggregate functions
Documentation - https://help.tableau.com/current/pro/desktop/en-
us/functions_all_categories.htm
Task – Create the same calculated field (as in last class) using CASE WHEN function
Start-Tech Academy
Data Analysis
Table calculations – Calculations on plotted data
Table
Calculations
Start-Tech Academy
Data Analysis
Table calculations only consider the final data plotted for calculations
Table
Calculations
Final data which is plotted
Start-Tech Academy
Data Analysis
Table calculations have two parts – Calculation and Direction
Direction – Across the table, Down the table, down and across etc.
Start-Tech Academy
Data Analysis
Table calculations have two parts – Calculation and Direction
Start-Tech Academy
Data Analysis
Table calculations have two parts – Calculation and Direction
Start-Tech Academy
Data Analysis
Table calculations have two parts – Calculation and Direction
Marketing Finance HR
Salaries 9% 13% 4%
Agency payments 22% 4% 22%
Other expenses 13% 4% 9%
Start-Tech Academy
Sets
A subset of data based on some conditions
Start-Tech Academy
Sets
Sets are created based on a condition
Why IN OUT
Start-Tech Academy
Sets
Sets can be used to compare IN vs OUT performance
Why IN OUT
Example: Compare the sum of sales in top 3 states vs all other states
IN – Top 3 states
OUT – All other states
Start-Tech Academy
Sets
Sets can be used combine sets as per set theory
Start-Tech Academy
Sets
Sets can be used combine sets as per set theory
Why
Union – All members Intersect – Shared
in both sets members in both sets
Start-Tech Academy
Box plot
What
Start-Tech Academy
Level of Detail
Level of Detail is the granularity in data/ how fine is the information
With LOD expressions, we can control the level of detail of the aggregation
What & Why
Syntax – { LOD keyword Dimension(s) : Aggregate Calculation }
Start-Tech Academy
LOD expressions
Example { FIXED [Student]: SUM([Marks Scored]) }
Student Exam Subject Institute Marks Scored Student Exam Subject Institute Marks Scored FIXED LOD
Student 1 Math A 92 Student 1 Math A 92 251
Student 1 Science A 73 Student 1 Science A 73 251
Student 1 English A 86 Student 1 English A 86 251
Student 2 Math A 66 Student 2 Math A 66 218
Students Sum of Marks Scored
Student 2 Science A 52 Student 2 Science A 52 218
Student 1 251
Student 2 English A 100 Student 2 English A 100 218
Student 2 218
Student 3 Math B 86 Student 3 Math B 86 236
Student 3 236
Student 3 Science B 51 Student 3 Science B 51 236
Student 4 202
Student 3 English B 99 Student 3 English B 99 236
Student 4 Math B 67 Student 4 Math B 67 202
Student 4 Science B 81 Student 4 Science B 81 202
Student 4 English B 54 Student 4 English B 54 202
Start-Tech Academy
LOD expressions
Example { Include [Student]: SUM([Marks Scored]) }
Student Exam Subject Institute Marks Scored Student Exam Subject Institute Marks Scored Include
Student 1 Math A 92 Student 1 Math A 92 251
Student 1 Science A 73 Student 1 Science A 73 251
Student 1 English A 86 Student 1 English A 86 251
Student 2 Math A 66 Student 2 Math A 66 218
Students Sum of Marks Scored
Student 2 Science A 52 Student 2 Science A 52 218
Student 1 251
Student 2 English A 100 Student 2 English A 100 218
Student 2 218
Student 3 Math B 86 Student 3 Math B 86 236
Student 3 236
Student 3 Science B 51 Student 3 Science B 51 236
Student 4 202
Student 3 English B 99 Student 3 English B 99 236
Student 4 Math B 67 Student 4 Math B 67 202
Student 4 Science B 81 Student 4 Science B 81 202
Student 4 English B 54 Student 4 English B 54 202
Start-Tech Academy
LOD expressions
Example { Exclude [Student]: SUM([Marks Scored]) }
Start-Tech Academy