INTRODUCTION TO
TABLEAU
Authored by Amy D. Such
What is Tableau
Tableau is a data visualization tool that lets us analyze virtually any
type of structured data and produce highly interactive and attractive
graphs, dashboards, and reports in minutes .
Using Tableau Effectively
Tableau makes it e asier to cre ate powerful, visual information that
communic ates what is important better than a spreadsheet or text
table . Tableau has advanc ed capabilities for more technic al users,
but it dra matically lowers the bar for cre ating dashboards and
performing analytic al analysis for non-tec hnic al analysts and
information consumers. ” – Dan Murray, Interworks
2
DATA SOURCES
Tableau can connect to all the popular data sources which are widely used.
Tableau’s native connectors can connect to the following types of data sources.
File Systems such as CSV, Excel, etc.
Relational Systems such as Oracle, Sql Server, DB2, etc.
Cloud Systems such as Windows Azure, Google BigQuery, etc.
Other Sources using ODBC
The following picture shows most of the data sources available through Tableau’s
native data connectors.
Choose a connection or an existing workbook from the Tableau
Welcome Page.
Note: Upon installing Tableau, check your loc al drive for My Tableau
Repository
4
Once you choose your data source, you (and it) are brought to the
Data Source Page where you c an format your metadata .
Sheets on the left navigation pane behave like tables in a database .
5
6
Splitting
String fields can be split into multiple fields for easier analysis
Automatic or custom split options
Aliasing
Roles (time, ship date/order date)
Binning (high/low sales)
Renaming
Data types
Geographic roles
Calculated fields
Pivoting
Data interpreter
Helps clean up data
7
THE INTERFACE
We work in workb ooks which contain worksheets, dashboards, and
stories
Worksheets are also known as Views of your data
We drag and drop fields from the data source onto Shelves
Rows, Columns, Filters …
Items that appear on shelves are called Pills
If the Pill is blue, it is a Dimension
If the Pill is green, it is a Measure
9
When you bring your data into Tableau, it automatically pla ces the
fields into one of two categories. Dimensions or Measures.
Dimensions are fields that organize your data into cate gories (or
buckets) .
Individual dimension values are called Members
Usually Non-numerical and provid e critical, contextual meaning
to a Measure .
Who, what, when, where, why
Measures return numeric values for “me asuring” different
dimensions.
Usually aggregated (sum, average, min, max, etc.)
Things you c an d o math on that are generally meaningless
without context
10
Revenue grew $22m during Q2
2017 in the Eastern Region for
Technology !
11
Change between data source, worksheets, and dashboards
using the tabs at the bottom
You can also add new worksheets, dashboards, or story
boards using the “new” buttons.
12
Once you’ve connected to data and evaluated
available dimensions and me asures in the Data
pane, you’ll need to decide where to drag desired
dimensions and measures. You may choose to
drag dire ctly onto the visualization or onto a
particular shelf or card.
The most common shelves are the Columns and
Rows. Dragging dimensions and measures to
these determines the layout of your visualization .
Use c ards to navigate pages, filters, and marks on a
worksheet .
The Page shelf acts as a modified Filters shelf
allowing you to page through values .
The Filters shelf allows you to narrow data down .
The Marks c ard allows you to customize the
display of the ‘marks’ that make up your chart.
13
Use dashboards to organize and interact with multiple worksheets
14
Use stories to combine elements and create directed, interactive
analysis
15
Use Show Me to sele ct or c hange between
different visualizations .
Anytime you’re editing a new or existing
worksheet, you’ll notice the Show Me tab at
the upper right of the screen .
Show Me displays a series of thumbnail images
re presenting the different typ es of c harts you
c an create with just a few clicks.
If you’ve already created a chart but would
like to switch to another, clicking a new
thumbnail from the Show Me dialog box will
change your current visualization .
Note: Only thumbnails for visualizations that are
applic able to the dimensions and measures
you’ve selected from your data pane will be a
ctive.
16
Add Dimensions and/or Measures from the Data pane to the Shelves
and Cards to create visualizations.
17
Tableau supports an additional method for automatically generating
views of data called Automatic Double- Click. To use this method,
double -click fields in the Data pane that you’d like to see in your
visualization . Ea ch double -click results in a “best guess” for how you
would like the field to be presented in your view .
Note: The order in which you double -click a measure or a dimension is
signification .
18
SORTING & FILTERING
Analysis can be enhanced by sorting results
Sorting can be done using buttons for simple sorting
Or … manually through the advanc ed
sorting dialog which is achieved by right -
clicking on a Pill from the Shelf and
clicking Sort.
20
Filtering results allows you to focus on particular
aspects of your data
Filter by dragging data fields from the Data pane
to the Filters c ard
Filtering c an also be created by right -clicking a Pill on a Shelf
In either c ase, a Filter dialog box will
reflect the data type chosen and
prompt you for additional criteria
21
Numeric Filter Dialog Box Text Filter Dialog Box
22
Filtering Data
Simple filtering c an b e d one by
selecting the headers or marks in a
View and choosing the Keep Only or
Exclude options
The Dimension members are removed
from the View and the filtered fields are
added to the Filters shelf
When selecting headers that are part
of a hierarchy all of the next level
members are selected automatic ally
Individual marks c an be selected on a
View, making it e asy to focus on or
remove outliers
23
Apply Filters to Multiple Worksheets
When you had a filter to a worksheet, be default it applies to the
current worksheet .
Sometimes, however, you might want to apply the filter to other
worksheets in the workbook .
You c an select specific worksheets to apply the filter to or apply it
glo bally to all worksheets that use the same data source or related
data sources.
On the Filters shelf, right -click the field
and select: Apply to Worksheets > All
Using Related Data Sources
Filters that use this option are global
across the workb ook.
24
FORMATTING
Tableau allows for extensive formatting of
your views and can be done for an entire
worksheet or down to the specific/individual
parts.
There are several ways to initiate formatting
in Tableau . You may choose options from
the Format dro p-d own menu or right-click
any element and choose Format from the
context menu .
Formatting c an include changing some or all
of the following:
Fonts
Alignment
Shading
Borders
Lines
26
Highlighters
Highlighters are used to quickly find and highlight data on a
visualization
These come in handy when adding a mark (like color) to a
visualization makes it too confusing or hard to read
Used when there’s already a color mark assigned to the visualization
Previously done through legends and dashbo ard actions
Can be used with reference bands and lines
Highlighter legend supports text
searches and dropdown
Multiple highlighters can be
added to a single visualization
27
Scatter Plots
Scatter Plots provide a way to show correlations between numerical
values
Scatter plots require at least two measures
One on ea ch of the columns and rows
Creates a simple Scatter Plot
Creates Matrix of Scatter Plots
28
A crosstab, sometimes referred to as a Pivot Table, is a table that summarizes data in
rows and columns of text .
Sometimes, even in Tableau, you just want to see the data and not a visualization.
You can easily convert your visualization into a crosstab.
Objective: Display the numbers associated with a data view.
1. Right-click any of the visualizations we’ve created thus far.
2. Select Duplicate as Crosstab .
A new sheet will automatically be created beside your visualization, displaying the same
information as data in rows and columns of text.
29
BASIC CALCULATIONS
Basic Calculations
Calculations are created to enhance the dashboard.
Tableau takes granular data and aggregates them in the
View.
Calculations help in extending the usage of aggregations.
If we’re looking for a particular dimension or measure that
does not seem to exist in our data source, we can form them
from calculations.
31
Aggregating Data
When a Measure is pla ced on a Shelf,
Table au automatically aggre gates the
data .
Tableau defaults to Sum.
You c an change the aggre gation
to other types (Average, Max, Min)
by clicking on the Pill, navigating to
Measure (Sum) and selecting from
the list of other choices.
Note: You c an disaggre gate data by
navigating to the Analysis Menu and
deselecting Aggregate Measures .
32
Aggregating Data
Dimensions c an also b e aggre gate d by right-clicking the Pill,
selecting Measure, and choosing from the list of options
available:
33
Granularity of Data
Data granularity refers to the level of detail or d epth of data
in a View
Defined by the Dimension fields
If a Dimension is dragge d to Detail, it will change the
granularity of the visualization
Dragging a Measure to Detail will have no effect
34
Quick Table Calculations
A quick table calculation is a
one-ste p process where you
choose a common, pre-defined
c alculation type from a list.
Tableau automatically applies the
most typic al settings for that c
alculation type .
To apply a quick table calculation,
simply right -click a measure from a
Shelf or Mark and choose Quick
Table Calculation from the context
menu .
35
Calculated Fields
When your data source doesn’t contain all the fields you need, you c
an add new ones as c alculated fields
The c alculated fields are saved as part of the data source and c an be
used as often as necessary
There’s several ways to create calculated fields. You c an do this easily
by using the calculation editor from the drop-down, by double -
clicking a Shelf or a Field on a Shelf, or by right -clicking “ white spa
ce” on the Data pane under Dimensions or Measures
Calculated fields c an be created from existing calculations
Calculations are based on Formulas and Fields
36
Formulas Make Up Calculated Fields
Formulas can contain functions, fields, operators, parameters, or
comments
The Calculation Editor provides color co ding based on the Field
added
Functions: Light Blue
Fields: Orange
Operators: Black
Parameters: Purple
Comments: Grey
Note: Tableau makes attempts to guess what you’re trying to do
and provides you with the tools you need for brackets and
parenthesis. You should not have to do much typing or guessing.
*Don’t “fight” the tool!
37
Functions
Functions c an be filtere d by
category
Use the Enter search … box to find
specific functions
Clicking on a function provid es tips
and examples to guide you
38
Comments
Comments c an provide context
or detail on calculations
Define comments using two
forward slashes
Auto-Completion forFormulas
Tableau will automatic ally attempt to fill in a formula
First attempts to find based on starts with then contains
Clicking Enter will enter your formula or function into your forming
c alculation
If you first type a [ auto-complete will show fields, parameters, or sets
instead of functions
If you’re using multiple data sources, auto -complete will add the fully-
qualified name of the Field so you c an see exactly where things are
being pulled from
39
Calculations c an be used for exception highlighting . In Tableau, this is
known as Spotlighting .
Spotlighting is based on thresholds set for a selected measure
It is a technique for showing discrete thresholds based on the values
of a measure. For instance, you might want to color- code Sales so
that those over $10,000 appear green and those b elow $10,000
appear red.
A spotlighting c alculation is just a sp ecial case of a calculation that
results in a discrete measure .
A discrete measure is a calculation that is a dependent variable (and
therefore a measure), but which results in a discrete result (as opposed to a
continuous result). Thus the name discrete measure .
40
POPULAR VISUALIZATION TYPES
Bar Charts
Bar Charts are excellent to compare data a cross categories
To cre ate a bar c hart, add a dimension to the Rows shelf and a
measure to the Columns shelf or vice versa
Adding the dimension (blue) to the Columns shelf and the measure
(green) to the Rows shelf will result in a Vertical Bar Chart.
Adding the measure (green) to the Columns shelf and the
dimension (blue) to the Rows shelf will result in a Horizontal Bar
Chart.
42
Heat Maps
In a Heat map, data is represented in terms of colors. They provide
a quick visual summary of the data.
Heat maps are best used for showing geographical representation
of data where ea ch individual value are shown as color.
Heat maps enable you to compare data in various c ategories using
different colors.
Example: Heat Map
43
Scatter Plots
Scatter Plots c an provide a very me aningful visualization of two
related numeric measures
Two different analyses that sc atter plots help consider:
Comparison/Correlation of the two measures
Concentration of data /existence of outliers
Effe ctive sc atter plots include either a sm all enough numb er of
marks following a general trend to draw quick conclusions about
the individual dimensions or a large concentration of marks to draw
general conclusions
Example: Scatter Plot
44
Pie Charts
Do the parts make up a meaningful whole?
If not, use a different chart. Only use a pie chart if you can define the
entire set in a way that makes sense to the viewer.
Are the parts mutually exclusive?
If there is overlap between the parts, use a different chart.
Do you want to compare the parts to each other or the parts to the
whole?
If the main purpose is to compare between the parts, use a different
chart. The main purpose of the pie chart is to show part -whole
relationships.
How many parts do you have?
If there are more than five to seven,
use a different chart. Pie charts with
lots of slices (or slices of very different size)
are hard to read.
45
Box Plot
Also known as Box and Whisker Plot
Used to show the distribution of data
46
Tree Maps
Treemaps are an alternative way of
visualizing the hierarchic al structure of a
diagram while also displaying quantities
for ea ch category via area size
Ea ch category is assigned a rectangle
area with their sub-category rectangles
nested inside of it.
When a quantity is assigned to a
cate gory, its area size is displayed in
proportion to that quantity and to the
other quantities within the same parent
category in a part -to-whole relationship.
The are a size of the parent category
is the total of its sub- categories .
Tree maps start from to p left (largest) to
bottom right (smallest)
47
Area Charts
Area charts are commonly used to show case data that depicts a
time -seriesrelationship
Unlike Line charts, they can also visually represent volume
Information is graphed on two axes, using data points connected
by line segments. The area between the axis and this line is
commonly emphasized with color or shading for legibility
Typically used when you need to:
Know the magnitude of a change
Compare a small number of
categories
Compare between trends
and not exa ct values
48
CREATING DASHBOARDS
Dashboards
Dashboards are collections of worksheets
They allow you to analyze multiple views at once
Dashboards are shown at the bottom as tabs like worksheets
Update automatic ally when data from the source is updated
Supports all the same formatting as worksheets
50
Dashboards
When creating a new dashboard, the data
pane is replaced with a list of worksheets and
objects
Objects can b e add ed by simply dragging
them over to the dashboard
By default, objects are “tiled” when they are
add ed but c an b e c hanged to “flo ating ” to
allow overlap
51
Adding Dashboard Objects
Dashboard objects allow you to enhance a dashboard with non-
worksheet items.
Objects include:
Text boxes
Images
Web Pages
Blank Spa ce
52
Organizing Dashboards
You have the ability to show and/or hide specific parts of a
dashbo ard as desired.
Title
Caption
Legends
Filters
Parameters
53
Organizing Dashboards
Dashboards can be sized based on the following options:
Automatic: dashboards adjust as needed
Exa ctly: fixed width, scrollable if larger than window
Range: scales between min and max size
Presets: select from common sizes
54
PUBLISHING & SHARING
Publishing & Sharing
Workb ooks c an b e shared with other Tableau Desktop users, like
any other file
Alternatively, workb ooks c an be published to private servers
Princeton Table au Server
Princeton Table au Public
Table au Public
You c an publish worksheets, dashboards, or stories
56
Publishing & Sharing
Workbooks c an be exported and published
Multiple formats are available to use the output in applications such
as PowerPoint, Word, or Excel
When saving, you c an save:
Workbooks (.twb )
all sheets, dashboards, and stories
Pa ckaged workbook (.twbx )
All sheets, dashboards, stories, and all reference local data file and images in a
single file
57
58
Objective: Open Tableau, connect to data, build a basic visualization to show Sales
for each Sub-Category broken down by Order Date Year vs. Category. Use color
show sum of Profit.
1. Open Tableau.
2. Connect to Excel.
3. Navigate to Excel Data Source per class instructions
Typically under this path:
My Tableau Repository > Datasources > 10.x > en_US- US > Vital Stock [Link]
4. Click Open.
5. This is the Data Source screen. Here, we will add sheets from the Excel file to act as the
fields for our visualization.
6. Under Sheets, drag Orders to where it says “Drag sheets here”. Our data appears in
the bottom pane.
7. In the bottom portion of the left pane, under the Go to Worksheet prompt, click Sheet.
8. In the left pane, within the Data tab, under Dimensions, drag Order Date to the
Columns shelf and Category and Sub-Category to the Rows shelf.
9. Under Measures, find and drag Sales to the Columns shelf and Profit to the Color mark
on the Marks c ard.
10. Double -click the bottom of the worksheet and rename it to Bar Chart.
23
Sum of Sales for each Sub-Category broken down by Order Date Year vs. Category. Color shows sum of
Profit. The view is filtered on Order Date Year, which keeps 2014, 2015, 2016 and2017.
24
Objective: We see a potential problem with the profitability of the furniture category.
Let’s enhance our results from the last exercise by performing a simple sort, and
filtering the results by the furniture category.
1. Right-click the Bar Chart worksheet and select Duplicate .
2. Now, rename your new worksheet New Bar Chart.
3. Click the last column in the chart.
4. From the toolbar at the top of the screen, click the Sort Descending button to sort
latest year Sales descending.
5. Let’s reduce the data set results by dragging Category to the Filters card.
6. From the Filter dialog box, uncheck Office Supplies and Technology.
7. Click OK.
8. Right-click Category in the Filters card and choose Show Filter to reveal the Filter c ard.
Note: Filter cards can be moved (dragged) from their default location (which tends to
hide under the Show Me box when it’s expanded.
9. Under Dimensions on the Data pane, right -click Region. Select Show Filter.
10. Explore.
32
Sum of Sales for each Sub-Category broken down by Order Date Year vs. Category. Color shows sumof
Profit. The data is filtered on Region, which keeps Central, East, South andWest.
The view is filtered on Category, which keeps Furniture.
33
Objective: We want to be able to quickly find patterns and trends in our data.
If our
visualization
assist the user in understanding
already contains awhat
colorwe’re
mark,trying
a highlighter
to focus on.
is the perfect
enhancement to
1. Create a New worksheet. Rename it Sub -Category Highlight.
2. Add Order Date to the Columns shelf and Sales to the Rows.
3. Maybe we want to be able to see the profit when you hover on a line but not have it
displayed in the a ctual Line C hart itself. To do this, drag Profit to the Tooltip.
4. Drag Region to the Color mark.
5. We want to increase the number of marks on this, so add Sub -Category to the Detail
mark. The Detail mark increases the context of our visualization.
6. Without reducing the highlighted number of marks, this is difficult to read. We could
use a filter, but that would remove the context of the selected marks in relation to the
other sub -categories. So … we will add a highlighter instead.
Continued on next page
37
7. In the Marks card, right -click the Sub-Category Pill and select Show Highlighter .
8. The Highlighter Legend Box will appear/ dock and show the different Sub-
Categories . As you mouse over each Sub-Category , you’ll notice each being
highlighted in the visualization.
9. Explore.
Note: Selecting Entire View from the drop -down in the tool bar will expand the
visualization to make it more legible.
38
The trend of sum of Sales for Order Date Year. Color shows details about Region.
Details are shown for Sub-Category.
39
The Marks c ard provides other options to customize the appearance of
your chart. You c an change the color, size, shape, and label of your
marks as well as customizing your tooltips .
Tooltips are small pop -up text boxes that appear when you hover your
mouse over a mark. By default, tooltips show values for all relevant fields
included somewhere on your visualization .
40
Objective: Create a scatter plot using colors and shapes to show the correlation
between sales and profit of different product sub-categories by category and region.
1. Create a New worksheet. Rename it Sales & Profit .
2. From Measures, drag Sales to the Columns shelf and Profit to the Rows shelf.
3. Drag Sub-Category to the bottom (empty) portion of the Marks card.
4. To distinguish our Sub-Categories , add Category to Color.
5. Add Region to Shape.
[Link]-click anywhere in the scatter plot and choose Trend Lines > Show Trend Lines .
This will show us linear trend lines.
44
Sum of Sales vs. sum of Profit. Color shows details about Category. Shape shows details aboutRegion.
Details are shown for Sub-Category.
45
CAT-2
Q1. You have been given a dataset on COVID-19, which contains the following details (Date,
. State, ConfirmedCases, Deaths, Recovery). The sample is shown below.
You are tasked with creating a dashboard using tableau that showcases the important
visualizations that show:
a) The severity of COVID in all the states in India
b) The recovery rate in the different states in the sorted order
c) Trend of COVID progression in India
d) The death rate in the different states
Ensure that all the necessary steps are mentioned in detail.
Solution
1. Steps to create the dashboard in Tableau-
Step 1: Load the Dataset into Tableau
1. Open Tableau Desktop.
2. Click on "Connect" → Select the data source (CSV, Excel, or Database).
3. Drag the dataset onto the Data Source pane and verify that the fields are correctly
recognized.
4. Click on Sheet 1 to begin creating visualizations.
Step 2: Create Individual Visualizations
(a) Severity of COVID in All States (Choropleth Map)
Purpose: Show the severity of COVID across different states in India.
Chart Type: Filled Map (Choropleth Map)
(b) Recovery Rate in Different States (Sorted Bar Chart)
Purpose: Display recovery rates across states in descending order.
Chart Type: Bar Chart
(c) Trend of COVID Progression in India (Line Chart)
Purpose: Show how COVID cases, deaths, and recoveries have changed over time.
🔹 Chart Type: Line Chart
(d) Death Rate in Different States (Bar Chart)
Purpose: Show which states had the highest death rates.
🔹 Chart Type: Bar Chart
Step 3: Create the Dashboard
Now that we have all four visualizations, let's build the dashboard.
Steps:
1. Click on the New Dashboard tab.
2. Drag and drop the following visualizations onto the dashboard:
• COVID Severity Map
• Recovery Rate by State
• COVID Trend Over Time
• Death Rate by State
• Resize the charts to fit properly.
3. Add interactive filters:
4. Drag State to the Filters pane.
5. Drag Date as a time filter to allow users to analyze trends over time.
6. Format the dashboard:
7. Add titles to each section.
8. Use a legend to explain color gradients.
9. Ensure a consistent color scheme for easy interpretation.
10. Save and publish the dashboard on Tableau Public/Server if needed.
Q2. Plot the following data on the map, such that the area mark is modified to denote the
population of the state. Justify which map paradigm will you choose, and elaborate on the
same.