PGPM - Term 6 - Tableau Slides
PGPM - Term 6 - Tableau Slides
Generation
2
Know your faculty
3
Importance and Application
● Data Visualization
○ Simplifies complex data into understandable visuals
○ Enhances decision-making through insightful analytics
● Use Cases Across Industries
○ Finance: Risk Assessment, Portfolio Management
○ Healthcare: Patient Data Analysis, Resource Allocation
○ Retail: Sales Trends, Inventory Management
○ Technology: Performance Monitoring, User Analytics
4
Tableau Product Suite
● Tableau Desktop
○ Creator
○ Public
● Tableau Server
● Tableau Online
● Tableau Reader
● Tableau Prep
5
Part 1 - Agenda
● Introduction to Desktop and Desktop Workflow
● Connect to Data Sources
● Working with Data in Tableau
● Creating Basic Visualisations
6
Part 1 - Agenda
● Introduction to Desktop and Desktop Workflow
○ The Tableau Platform
○ Tableau Terminology
○ Visual Cues for Fields
○ Elements of a Visualization
○ Tableau File Types
● Connect to Data Sources
● Working with Data in Tableau
● Creating Basic Visualisations
7
Start Page
1. Tableau Icon
2. Connect Pane
3. Accelerators
4. Open Pane
5. Discover Pane
11
Tableau Worksheet View
Additional Resources: The Tableau Workspace, Shelves and Cards, Parts of the View 12
A. Side Bar - In a worksheet, the side bar area contains the Data pane and the Analytics pane.
B. Toolbar - Use the toolbar to access commands and analysis and navigation tools.
C. Marks Card - The Marks card is a key element for visual analysis in Tableau. As you drag fields to different
properties in the Marks card, you add context and detail to the marks in the view.
D. Rows and Columns Shelf - Drag fields to the cards and shelves in the workspace to add data to your view.
E. View - This is the canvas in the workspace where you create a visualization (also referred to as a "viz").
F. Status bar - Displays information about the current view.
Additional Resources: The Tableau Workspace, Shelves and Cards, Parts of the View 13
Tableau Terminology
Dimensions
● Dimensions set the granularity, or the level of detail
● Dimensions are usually (but not always) categorical fields such as Order Priority and City.
● We typically want to view our data by some combination of these categories.
Measures
● Measures are usually numerical data
● They’re aggregated up to the granularity set by the dimensions in the view.
14
Tableau Terminology
Discrete
● Discrete data is made up of discrete or distinct values.
● Discrete data is countable
Continuous
● Continuous data is information that occurs in a continuous series.
● It includes any value that falls inside a range.
● Continuous data is measurable
15
Data Types
Quantitative Qualitative
16
Data Types
Quantitative Qualitative
17
Quantitative Data
Data which can be measured. Used to represent amounts, frequencies or values.
1. Discrete
1. Can only take certain values
2. Countable
2. Continuous
1. Can take any value within a range
2. Measurable
Quantitative Qualitative
19
Qualitative Data
Non-numerical information that describes characteristics, qualities, or attributes.
Answers questions such as “what,” “how,” or “why,” focusing on meanings, concepts, or experiences
rather than quantities.
1. Nominal
1. Independent of each other. No Order. Simply Different
2. Cannot be quantified
2. Ordinal
1. Defined Order or Ranking
2. Differences may not be equal or measurable
20
Anscombe’s Quartet
21
Anscombe’s Quartet
22
Visual Cues for Tableau
Numeric values.
Date values.
Geographical data. This icon also indicates the field has been assigned a geographic
role.
23
Elements of a Visualisation
Dimensions, Measures, and Marks are combined to create different charts to visualize data.
● Dimensions are qualitative values such as names and dates.
● Measures are numeric, quantitative values you can measure.
● Marks are the data points displayed on the view using:
● Color
● Size
● Shape
● Tooltip
24
Tableau File Types
Several different file types are used within Tableau
● Workbooks (.twb) - Hold one or more worksheets or dashboards. These do not include the data.
● Bookmarks (.tbm) - Contain a single worksheet and are easy to share your work.
● Packaged Workbooks (.twbx) - Contain the workbook along with any other supporting data or
images.
● Extract (.hyper or .tde) - Local copy of a subset or entire data that you can use to share with others.
● Data Source (.tds) - Shortcut for quickly connecting to the data. These files do not contain the actual
data but rather the information to connect.
● Packaged Data Source (.tdsx) - Contains the data source file as well as any local file data.
25
Part 1 - Agenda
● Introduction to Desktop and Desktop Workflow
● Connect to Data Sources
● Working with Data in Tableau
● Creating Basic Visualisations
26
Connect to Data Sources in Tableau
Connecting to Flat Files
● Excel, CSV files
Overview of Data Connection Options
● Databases (SQL Server, Oracle)
● Cloud services (Google Sheets, AWS)
● Live vs. Extract Connections
27
Part 1 - Agenda
● Introduction to Desktop and Desktop Workflow
● Connect to Data Sources
● Working with Data in Tableau
● Creating Basic Visualisations
28
Working with Data in Tableau
Creating Hierarchies
1. Create a new worksheet and rename it Hierarchies.
2. Drag the Sub-Category dimension on top of the Category
dimension.
3. Rename the hierarchy Categories.
4. Drag Categories to the Columns shelf and Sales to the Rows
shelf.
5. Click the plus (+) icon on the Categories field to drill down in
the hierarchy.
6. Click the minus (-) icon on the Categories field to close the drill
down.
29
Part 1 - Agenda
30
Build a Bar / Column Chart
1. Create a new sheet and rename it Bar Chart.
2. Drag the Category dimension to the Columns shelf and Sales
measure to the Rows shelf.
3. Using the sort icon on the vertical axis, change the sort type to
descending.
What will happen if you Swap the Rows and Columns???
1. Move Category to the Rows shelf and Sales to the Columns
shelf.
The direction of the chart changes based on the location of the
dimension on the shelf card.
31
Build a Line Chart
1. Create a new worksheet and rename it Line Chart.
2. Locate the Order Date dimension and drag it to the Columns
shelf.
3. Drag the Sales measure to the Rows shelf.
You now have a line graph with a horizontal axis that contains a date
(discrete date) and a vertical axis that contains Sales. By default, the
Sales is set to a SUM aggregation.
1. You will notice that the Order Date is grouped in a hierarchy at the
date part of year. Click on the plus (+) sign to add the next level
of hierarchy to your view.
32
Encoding your data
Using the Marks Card
● Color: Encoding data with colors
● Size: Adjusting the size of marks
● Label: Adding labels to marks
● Tooltip: Customizing tooltips
● Detail: Adding more dimensions to the view
● Shape: Changing the shape of marks
What happens when you add Sales to the colour tile in the Bar Chart?
33
Encoding your data
Using the Marks Card
● Color: Encoding data with colors
● Size: Adjusting the size of marks
● Label: Adding labels to marks
● Tooltip: Customizing tooltips
● Detail: Adding more dimensions to the view
● Shape: Changing the shape of marks
What happens when you add Sales to the colour tile in the Bar Chart?
What happens when you add Region to the Detail and Color tile?
34
Part 2 - Agenda
● Filtering and Sorting
● Calculated Fields
● Parameters
35
Part 2 - Agenda
● Filtering and Sorting
○ Filters on Dimensions
○ Filters on Measures
○ Filters on Date
○ Quick Filters and Filter Options
○ Context Filters
○ Manual Sorting
○ Sorting by Field
● Calculated Fields
● Parameters
36
Filters on Dimensions
Dimensions contain discrete categorical data, so filtering this type of
field generally involves selecting the values to include or exclude.
● General: To select the values you want to include or exclude.
● Wildcard: To define a pattern to filter on.
● Condition: To filter dialog box to define rules to filter by.
● Top: Filter to define a formula that computes the data that will
be included in the view.
37
Filters on Measures
Measures contain quantitative data, so filtering this type of field generally
involves selecting a range of values that you want to include.
● Select how you want to aggregate the field, and then click Next.
● Range of Values: Specify the minimum and maximum values of the
range to include in the view.
● At Least: To include all values that are greater than or equal to a
specified minimum value.
● At Most: To include all values that are less than or equal to a specified
maximum value.
● Special: To include only Null values, Non-null values, or All Values.
38
Filters on Dates
Select whether you want to filter on a relative date; filter between a range of
dates; or select discrete dates or individual dates to filter from the view.
● Filter relative dates: To define a range of dates that updates based on
the date and time you open the view.
● Filter a range of dates: To define a fixed range of dates to filter.
● Filter discrete dates: If you want to include entire date levels.
● Latest date preset: If you want to ensure that only the most recent
date in a data source is selected in the filter when the workbook is
shared or opened, select a discrete date such as Month/Day/Year or
Individual Dates and then, on the General tab, select Filter to latest
date value when workbook is opened.
39
Context Filters
● All filters that you set in Tableau are computed independently.
● Each filter accesses all rows in your data source without regard to
other filters.
This is an issue when you want to apply multiple dependent filters.
Example: You want to find out the Top 10 customers in the Central Region
1. Add Customer Name to Columns and Sales to the Text tile.
2. Perform a descending sort.
3. Add Customer Name to the Filter Shelf and filter for Top 10
customers
Is this what we wanted to build???
40
Context Filters
The current view shows you the intersection of Top 10 customers from the
dataset and their respective Sales in the Central Region.
Let’s fix this
3. Add Region to the Filter Shelf
4. Click on the Region field and enable Show Filter
5. Select ‘Central’ from the multiple-value list.
6. Right click on the Region field and click on ‘Add to Context’
Now observe how the Customer Names and Sales values have changed.
Context filters are independent filters. All other filters process the only the
data which has passed through the context filter
41
Filter Options
● Edit Filter & Remove Filter
● Apply to worksheets - Specify the worksheets on which the filter should be
applied
● ^Format Filters - Customize the font and colors of all your filter cards
● Only relevant values - Only values that pass through these filters are shown.
● All values in hierarchy - Filter values are displayed based on relevance of
the parent/child relationships in the hierarchy.
● All values in database - All values are shown regardless of the other filters
● ^All values in context - When one of the filters in the view is a context filter
● Include values or Exclude values
● ^Hide Card
43
Calculated Fields
Calculated fields allow you to create new data from data that already exists in your data source. When you
create a calculated field, you are essentially creating a new field (or column) in your data source, the
values or members of which are determined by a calculation that you control.
● They can be created for the entire dataset.
● CANNOT be created ONLY for a few records
● To segment data
● To convert the data type of a field, such as converting a string to a date.
● To aggregate data
● To filter results
● To calculate ratios
44
Calculated Fields
● Basic calculations - Basic calculations allow you to transform values or members at the data
source level of detail (a row-level calculation) or at the visualization level of detail (an aggregate
calculation).
● Level of Detail (LOD) expressions - Just like basic calculations, LOD calculations allow you to
compute values at the data source level and the visualization level. However, LOD calculations give
you even more control on the level of granularity you want to compute.
● Table calculations - Table calculations allow you to transform values at the level of detail of the
visualization only.
Additional Resources: Create Level of Detail Expressions in Tableau, Transform Values with Table Calculations 45
Aggregate Functions and Calculations
● COUNT(expression), COUNTD(expression)
● SUM(expression), AVG(expression), MAX(expression) or MAX(expr1, expr2),
MIN(expression) or MIN(expr1, expr2), MEDIAN(expression)
● CORR(expression1, expression2)
● COVAR(expression1, expression2), COVARP(expression 1, expression2)
● STDEV(expression), STDEVP(expression)
● VAR(expression), VARP(expression)
50
Parameters
● Parameters in Tableau are dynamic input values that can be used in
calculations, filters, and other parts of the analysis
● You can use parameters to create conditions that allow users to
interactively control certain aspects of the data displayed in a
visualization
There are four steps to using Parameters in Tableau
1. Create: Create a parameter
2. Set: Set the proper data type and Allowlable values
3. Assign: Assign the parameters to a calculated field OR filter OR bin OR
Set
4. Plot: Plot the graph and ‘Show Parameter’ on the chart for interactions
Additional Resources: Create Parameters, Swap Measures using Parameters, Use Parameters to Make Views More Interactive 51
Part 3 - Agenda
● Quick Table Calculations
● Charts in Tableau
● Level of Details Functions
● Analytics Pane
● Story
52
Part 3 - Agenda
● Quick Table Calculations
● Charts in Tableau
● Level of Details Functions
● Analytics Pane
● Story
53
Quick Table Calculations
Quick table calculations allow you to quickly apply a common table calculation to your visualization using
the most typical settings for that calculation type.
The following quick table calculations are available in Tableau for you to use:
Additional Resources: Create Parameters, Swap Measures using Parameters, Use Parameters to Make Views More Interactive 54
Part 3 - Agenda
● Quick Table Calculations
● Charts in Tableau
● Level of Details Functions
● Analytics Pane
● Story
55
Charts in Tableau
● Pie Charts
● Heat Maps
● Dual Axis Charts
● Histrogram
56
Pie Chart
1. Connect to the Sample Superstore dataset
2. Add Category to the Rows shelf
3. Add Sales to Text in the Marks shelf
4. Right-click on the Sales pill, navigate to
the Quick Table calculation menu and
choose ‘Percent of Total’
5. Select the ‘Pie Chart’ option from the
‘Show me’ menu
6. Choose ‘Entire View’ from the fit menu
7. Add Category and Sales (Percent of Total)
to Label.
62
Level of Details Expressions
Level of Detail expressions (also known as LOD expressions) allow you to compute
values at the data source level and the visualization level.
There are three types of LOD expressions
1. FIXED
2. INCLUDE
3. EXCLUDE
Depending on the use case, you can choose the appropriate LOD.
64
Analytics Pane
The Analytics Pane in Tableau allows you to understand and perform
advanced analytics on your data. There are three sections within the
Analytics Pane
1. Summarize
2. Model
3. Custom
Depending on your use case, use the appropriate analytics object for your
analysis
66
Story
A story is a sequence of visualizations that work together to convey information. You can create
stories to tell a data narrative, provide context, demonstrate how decisions relate to outcomes, or to
simply make a compelling case.
A story is a collection of sheets and each sheet within this sequence is called a Story Point.
Additional Resources: Create a Story, The Story Workspace, Best Practices for Telling Great Stories 67