A Step-By-Step Guide For Tableau
A Step-By-Step Guide For Tableau
A Step-By-Step Guide For Tableau
using Tableau
Introduction to Data Visualization using Tableau
Our goal as Data Analysts is to get the insights from our data in such a way that
everybody who sees them can easily understand their implications and how to act on
them.
Tableau is a data analytics and visualization tool. It’s the leading (33% market share
followed by Power-BI) data analytics and visualization tool in the market. Tableau
comes with a very easy drag-drop interface which makes it easy to learn and you can
work on almost every type of data in Tableau.
Table of Contents
This article will give you a walkthrough of all essential features of the Tableau,
which you must know in order to work on it:
Tableau Desktop is a program that allows you to execute complicated data analysis
tasks and generate dynamic, interactive representations to explain the results.
Tableau also lets you share your analysis and visualizations with the rest of your
company, allowing everyone from coworkers to top management to look into the
data that matters to them.
Before you can begin using Tableau, you need to download the Tableau setup from
the link and then accept all the licenses and agreements. After installation, you will
get a home screen same as the given picture below.
After installation, if you find this Homescreen you are good to go:
Getting Started with Data Visualization using Tableau
Once you have installed Tableau in the system, let’s start with some real-world Data
Visualization using Tableau.
We will be using global superstore data throughout the article, which is perfect for
learning purposes. This link will take you to a page where you may download the
dataset. The downloaded file is a zip file that contains an excel that looks like the
given picture below:
Now we have an excel file and Tableau installed let’s load the data set into Tableau.
Tableau also gives us some flexibility to create new columns, rename, split, edit
alias, join tables, some preprocessing before loading the data into Tableau. The
below image will demonstrate to you how to load data and perform some
preprocessing.
Tableau supports various data formats which can be loaded by choosing those
options. Under a file we see various options to load data from the local directory and
under to a server, we see options to load data from cloud servers. for loading CSV
files we select Text file options, for excel and SQL files we choose their respective
options.
1. To open the application, click the Tableau icon on your desktop (or in your Start
menu).
2. In the Connect panel at the left side of the Start page, click the Excel link under
the “To a File” heading to the open file selection option.
3. Using the file selection box, select the Excel worksheet that you want to open,
and then click the Open button to continue
4. Select
the Orders sheet from the navigation menu on the left and drag it onto
the Drag Sheets Here area, as shown in the above gif.
5. After loading we can perform data cleaning, data preprocessing, feature
extraction to some extent.
Up until now, we have Tableau loaded with global-superstore data and now we can
see Tableau work-page. Tableau work-page consist of different section. Let’s
understand them first before plotting our graphs.
Source: Local
• Data Source: Using Data Source we can add new data, modify, remove data.
• Current Sheet: The current sheets are those sheets which we have created and
to those, we can give some names.
• New Sheet: If we want to create a new worksheet ( blank canvas ) we can do
using this tab.
• New Dashboard: This button is used to create a dashboard canvas.
• New Storyboard: It is used to create a new story
1. drag the dimension and measure in row and column input field and it will
automatically suggest a graph best fitted on data.
2. you can change the graph by clicking on the show me button and select
whichever graph you want.
3. you can also remove the axis just by dragging and dropping them under the
marks card (remove field).
4. Show Me: When you click this label, a palette appears, giving you rapid access
to many options for showing the selected types of fields. The palette changes
depending on the fields in the worksheet you’ve selected or are active.
From the above image, you might have observed that the default aggregation on the
measure is sum but you can change the aggregation to sum, avg, min, max, etc, you
can also customize the axis name, orientation, size, show-hide axis as shown in the
above image.
In order to create a beautiful interactive visual, you must understand the following
features:
a. Marks card
Marks card is very important for plotting graphs. In marks card we have:
Colour button which is used to give different colors to different categories and
measures,
Size button is used to give size which depends on how big a value is. The bigger the
value means bigger the size of a particular mark
Label button which is used to show labels to graphs, clicking on the label button
throws us some settings where you can set the formatting of labels.
Tooltips, here you can add information like ( profit, quantity, sales, discount,
category, state, etc.) which will be visible on hovering over the graph
The Details button allows you to display more information without affecting the
table’s structure. which is used to show details about particular points. dragging a
field on details buttons will show the details of that point, and this feature is majorly
used for maps to show more details of a particular point.
b. Filter
After creating some plots you might want to use different filters, to do so follow
these steps:
1. On the filter shelf, you can drag any measure or dimension whichever you want
to apply a filter on.
2. As you drop the field a box will appear, now you can select any particular
category, or top-n rows according to measure values or you can write some rules
to select top rows or by using some parameters.
3. Now click on show filter after selecting the filter you just applied.
4. You may want to apply multiple filters, to do so you will need to add previous
filters into context by clicking on add to context here Context Filter is a
Tableau filter that is applied before all other filters. You can choose different
options standard, fit width, fit height, entire view from the toolbar in order
to fit the visualization into the worksheet.
c. Hierarchy
You can quickly establish hierarchies with Tableau to keep your data organized.
Hierarchy is basically nesting the same type of related data together. Tableau
calendar data is an example of a hierarchy.
Date-time, calendar is in the form of hierarchy in Tableau, which can be drilled down
to year -> quarter ->month -> day by clicking on the “+” button on the features tab,
You also can create your own hierarchy like country -> state -> city -> postal code,
just by dragging features to another and when needed clicking on ‘+’ button you can
drill down further to city, state, postal code.
d. Parameter
A parameter is a workbook variable like a number, date, or string that can be readily
managed by the user to replace a constant value in a calculation.
In the above image, our goal was to choose the top N countries having maximum
sales but here we wanted to let the user select how many top countries they want to
list. To accomplish so, we’ll need to create the following parameters:
1. Click the down arrow to the right of Dimensions in the Data pane and select
Create Parameter from the pop-up menu that appears, as shown in the above
image. and give a name variable1.
2. Select a data type from the Data Type drop-down menu, in my case, I have
chosen to int range from 1–100 list and the current value will be 5.
3. Click on show parameter will show the parameter with a slider. but it hasn’t
yet connected with any working.
4. Here we wanted to choose top-N countries based on the sales. drag country field
to filter shelf and choose top tab and then choose variable1 in by field
section and choose SUM(SALES).
5. Now slide the parameter value and observe the difference.
e . Calculated field
Tableau gives us the option to create a calculated field where we can create our own
new field( column). Tableau comes with many functions like if-else, switch, case,
date diff, level of dimension which is extensively used for our visualization
• To segment data
• level of details(LOD)
• To change a field’s data type, for example, from a string to a date.
• To aggregate data
• handling date time
• To filter results
• To calculate ratios
In Tableau, select Analysis > Create Calculated Field then we give some rules to
create a calculated field and it will create a new field in the data shelf. which we can
use by dragging to the axis. more on the calculated field can be read on the link.
Creating Calculated Field:
Here our goal is to calculate delivery days using order date and ship date:
1. Select Analysis > Create Calculated Field and give the name delivery days
2. Give the Rule to calculate delivery days in the rule box. here we will use
the DATEDIFF function to subtract two dates.
3. Type Rule: delivery days = DATEDIFF(‘day’, [shipdate],[order date])
4. now drag the delivery days field in rows or cols.
f. Format
Formatting in Tableau is very easy. Just click on the format button wherever you
want to format. we can format text, numbers, percentage, decimals, date-time
format, label color, label size, axis line color, worksheet, columns, header, etc . as
shown in the above image.
Source: Local
1. From the Analytics tab on the left side, you can choose various options.
2. Dragging and dropping a constant line on a particular X, or Y-axis draws a line
at a given constant value.
3. Dragging forecast on your sheet will give you a time forecasting of a given
measure, which you can edit by clicking right click on the forecasted part, there
you can choose the confidence interval, time steps to be forecasted and forecast
model, etc.
4. The trend line is not the same as forecasting. The trend line only tells us if the
overall trend is increasing or decreasing.
Maps in Tableau
We can easily draw maps in Tableau if we have geographical data aka a location
field (country, city, state, etc). Tableau has 2 types of maps, symbol map, filled map.
Source: Local
you can also decide the colors of different states based on the sales amount on the
filled map.
Source: Local
From the above image you see that the color of bars has decided by the profit amount,
more profit means more bluish in color, more loss means more reddish in color
1. Drag a dimension or measure in the color shelf under the marks card.
2. Now you see colors are now visible as a legend.
3. Now click on the legend and then choose edit colors.
4. you can choose a wide variety of colors, modes of coloring like stepped or
continuous bar and
5. you can edit the range of colors as well.
Tooltip: When we hover over a particular point on the graph we see a box showing
up details about that particular point, this is basically a tooltip. we can add
information to show as a tooltip, let’s see an example.
As you can see dragging a field on the Tooltip button adds details in the tooltip which
can be seen on hover, we can also customize the text, color, font of the tooltip.
Combining multiple views with filters, interactivity, legends on the same page is
simply our dashboard. it helps us to see all views on the same page with fully
interactive features. Let’s see an example.
You can also apply filters on different visuals present in our dashboard. More
information on the dashboard may be found here.
Storytelling in Tableau
In storytelling, we take a visual and write a narration about the insight that has found
from visual
Creating a story is the same as creating a dashboard, just drag our visual on the story
page and give narration. You can add as many visuals as you want along with
narration.
Source: Local
Actually creating story points in Tableau is easy. You can see an example of creating
a Story Point and experience Tableau’s free on-demand training at the same time!
Go to Tableau’s training page.
Tableau comes with autosave features so you don’t need to worry if you couldn’t
save your work manually.
Tableau Desktop
To save a Tableau workbook locally, Select File > Save. Specify the workbook file
name in the Save Asdialogue box. Tableau saves the file with the .twb extension by
default.
Tableau Server
In case the data is confidential and the story needs to be shared with the entire team,
Tableau Server comes in handy. Select Server > Publish Workbook or click Share
in the toolbar to publish a story to Tableau Server.
Tableau Public
With Tableau Public all the views and data are made public and anybody on the
internet has access to it. Select Server > Tableau Public > Save to Tableau
Public and give your credentials. before accessing Tableau public you should have
a Tableau public account.
Tips: