You are on page 1of 87

Tableau Experiment: Creating a Map

& Working with Hierarchies

Delivered By:
Dr. Gaurav Kumar Ameta
Associate Professor & Head
Department of Computer Engineering
Swarrnim Startup & Innovation University
1
Experiment : Tableau
• Creating a Map and Working with Hierarchies
Step 1: Download the datasheet from
www.superdatascience.com/tableau
Step 2: Download the sheet titled as P1-
AmazingMartEU2.xlsx for analysis.
Step 3: Evaluate all the three tabs of the sheet.
ListOfOrders, OrderBreakdown and SalesTarget.
Step 4: Only on first two tabs we need to focus.

2
Experiment : Tableau
Step 5: Now Open Tableau Public and Upload
the sheet into it for analytics.
Step 6: After uploading drag ListOfOrders into
the workspace.

3
Experiment : Tableau
Step 7: To join two tables drag
OrderBreakdown also to the workspace.
Automatically a join will be created.
Step 8: Rename the list as per join

4
Experiment : Tableau
Step 9: Click on Sheet 1, following will be
appear on the left of screen. Now we delete the
country, state, city to procure them under new
hierarchy named as Geography.

5
Experiment : Tableau
Step 10: Click on Sheet 1, following will be
appear on the left of screen. Now we delete the
country, state, city to procure them under new
hierarchy named as Geography.

6
Experiment : Tableau
Step 11: After removal of hierarchy all data like
country, state, city will be merged.

7
Experiment : Tableau
Step 12: Now to create new hierarchy drag city
on country after that give names as Geography
to create new hierarchy.

8
Experiment : Tableau
Step 13: Drag State between country and city.

9
Experiment : Tableau
Step 14: Drag country into workspace. It
automatically detects that data is of Europe.
Map of Europe appears on that. Dot represents
countries.

10
Experiment : Tableau
Step 15: Now Drag state and city into
workspace.

11
Experiment : Tableau
Step 16: Now delete city and put only country
and state on the map. Drag Order Date onto
Filters. Click on years and next.

12
Experiment : Tableau
Step 17: Select any one year i.e. 2012.

13
Experiment : Tableau
Step 18: We will get the following output

14
Experiment : Tableau
Step 19:Now right click in filter at to enable
quick filter option

15
Experiment : Tableau
Step 20: Following will appear. Click on show
filter

16
Experiment : Tableau
Step 21: Following output you will get at the
right side. From where you can apply filter
options.

17
Experiment : Tableau
Step 22: Click on year order date and select
single value slider.

18
Experiment : Tableau
Step 23: Click on year order date and select
single value slider. A slider will appear for
years.

19
Experiment : Tableau
Step 24: Now Drag Sales on Size

20
Experiment : Tableau
Step 25: Output will be

21
Experiment : Tableau
Step 26: Now Click on size. A slider will appear.

22
Experiment: Tableau
Step 27: If we want to encircle these circles with
a thick border go to color→border→select the
boundary color.

23
Experiment: Tableau
Step 28: Selected color i.e. black will appear as
follows. Circle boundaries are appeared as
black.

24
Experiment: Tableau
• Now we want to create a calculated field for
calculating the profit margin of every single
state:
We need to create a field that will take sum
of profit and divided by the sum of sales.

Profit Margin= Sum of Profit/Sum of Sales

25
Experiment Tableau
Right click on
Profit→Create→Calculated
Field

26
Experiment: Tableau
• Now do as follows. Give name as Profit
Margin.
Profit Margin= SUM([Profit])/SUM([Sales])
• Then click on apply and then on OK.

27
Experiment: Tableau
• A field Profit
Margin is created.
Drag it onto color.
• Now observe the
changes as per
next slide.

28
Experiment: Tableau
• Results are produced in the form of aggregate
of Profit Margin showing that it is an
aggregated field not a single value field.

29
Experiment Tableau
• If we want to adjust colors. Go to colors as below. Click on edit
colors. Different type of color palette you can select if you
want. I selected red-green diverging.

30
Experiment: Tableau
• After that we can select the range of which
data we want to display. [-0.5,0.5]. Click on OK
and Apply.

31
Experiment: Tableau

32
Tableau Experiment: Creating a
Scatter plot & Advanced Filters

Delivered By:
Dr. Gaurav Kumar Ameta
Associate Professor & Head
Department of Computer Engineering
Swarrnim Startup & Innovation University
33
Creating a Scatter plot & Advanced
Filters
• Click at the bottom and create new worksheet

34
Creating a Scatter plot & Advanced
Filters
Rename the sheets the first (Sheet 1) as Map
of Europe
and the second one (Sheet 2) as Customer
Scatter plot.

35
Creating a Scatter plot & Advanced
Filters
• We wanted to look same years over all
worksheets. OR
• We want to apply filters on many different
worksheets
• So for that we add some data into the
worksheet and then we will apply the filters
on it.
• Drag Sales in columns and Profit into Rows.

36
Creating a Scatter plot and
Advanced Filters

37
Creating a Scatter plot and
Advanced Filters
• This single dot presents that Tableau has aggregated sum
sales and sum of profit for all of the years, all of the
customers and all of the regions etc.

38
Creating a Scatter plot and
Advanced Filters
• If we want do disaggregate everything in that
case go to analysis and uncheck the aggregate
measures option.

39
Creating a Scatter plot and
Advanced Filters

40
Creating a Scatter plot and
Advanced Filters
• Now to see customer wise detail in this plot.
Drag customer name onto detail. Now specific
customer detail you can see.

41
Creating a Scatter plot and
Advanced Filters
• Now, If we want to apply a single filter on all
worksheets.

42
Creating a Scatter Plot and
Advanced Filter
• After applying that on all data sheets related
to the same database filter is applied. You can
see a symbol of database at the filter.

43
Creating a Scatter Plot and
Advanced Filter
• Changing the filter to
the slider. Now Slider
will appear.
• Change in one sheet
automatically reflect
to next sheet linked
to the same data
source (database).

44
Creating a Scatter Plot and
Advanced Filter
• Now if we click on new
worksheet.
• Then same filter will
not be applied
automatically because
Tableau does not able
to know that this
worksheet will be able
to join this sheet with
that data source or not.
• Blank Sheet will appear.
45
Creating a Scatter Plot and
Advanced Filter
• To connect it with and for applying the filter on this sheet
too.
• You need to drag any one field onto this workspace
• Drag No. of Records to workspace

46
Creating a Scatter Plot and
Advanced Filter
• We can see that automatically filter is applied
on this sheet as we have in other sheets.

47
Creating a Scatter Plot and
Advanced Filter

Above was our last output of Scatter plot


48
Creating a Scatter Plot and
Advanced Filter
• Lets make this
scatter plot
prettier. We are
going to add some
color.
• Drag Profit Margin
(which we have
generated from
create calculated
field) to color.
• Blue→Profit
Orange→Loss

49
Creating a Scatter Plot and
Advanced Filter
• To change Shape.
You can Click on the
Shape and select the
shape which you
want to use in place
of circles.
• If I select + then
image will appear as
per next slide.

50
Creating a Scatter Plot and
Advanced Filter

51
Creating a Scatter Plot and
Advanced Filter
• Now if you want to
change color. Click
on color. Following
screen will appear.
• You can select any
color scheme.
• Select
Palette→OK→Apply

52
Creating a Scatter Plot and
Advanced Filter

53
Creating a Scatter Plot and
Advanced Filter
• You can also specify the range of output by
clicking advanced option

54
Creating a Scatter Plot and
Advanced Filter

55
Creating a Very First Dashboard
• Dashboard means: At present we are having
two tabs

• We need to display details of Map of Europe


and customer scatter plot together on one
platform i.e. “DASHBOARD”.

56
Creating a Very First Dashboard

To create a Dashboard Click on the second


button mentioning that New Dashboard.
57
Creating a very first Dashboard
• Following Screen will appear

58
Creating a very first Dashboard
• Now Drag Map of Europe on to the Workspace

59
Creating a very first Dashboard
• Now Drag Customer Scatter plot on the
Workspace. Tableau automatically suggests
you the place where you can drop this second
one.
• I kept it underneath the first one. Following
output will appear.

60
Creating a very first Dashboard

61
Creating a very first Dashboard
• What if not a single filter is available in the dashboard??
OR All available filters are deleted. Image will be like this

62
Creating a very first Dashboard
• In that case you need to create filters:
Click on the dropdown and select Filters →Year
of order date. Filter will appear at the right.

63
Creating a very first Dashboard

64
Creating a very first dashboard
• We can
create
slider as
below

65
Creating a very first Dashboard
•This filter
has been
applied to
both of the
worksheets.

•We can
check it by
the
movement
of the slider.

66
Adding an interactive action
• In this section we will enrich our dashboard in
more interactive manner.
• We want to allow user of his dashboard to drill
into certain parts of the map by just clicking
on it.
• If the user wants to drill in the France.
• In Tableau there are two types of actions:
Filtering & Highlighting
67
Adding an interactive action
At the top of the map of Europe. We click on the drop
down and then click on use as filter option

68
Adding an interactive action
•When we click on
use as filter option
we will create a
relationship of
filters between
scatter plot and
map of Europe.

•Ex. Click on
France. France
Scatter plot will
appear 69
Adding an Interactive Icon
• Now if we click on dashboard and click on
actions

70
Adding an Interactive Icon

71
Adding an Interactive Icon
• Click on action generated and then edit.

72
Adding an Interactive Icon
Select: It shows that
Source Sheet is Map
o Europe from which
we are doing
selection.

And its impact is


appearing on the two
target sheets by
filtering the criteria of
selection i.e country
which is clicked.
73
Adding an Interactive Icon
• Click on
Hover→OK.
Now navigate
on the map of
Europe as you
move.
• Observe that
Scatterplot
will change
accordingly.
74
Adding an Interactive Icon

75
Adding an Interactive Icon
• Try Another Features of the Action and
observe the changes.

76
Adding an Interactive Icon
• How you can create a specific filter at
your own? So delete the existing filter by
Dashboard→Actions→ Select→Remove

77
Adding an Interactive Icon
• To add Filter again go to
Dashboard→Actions→ Add Action→Filter

78
Adding an Interactive Icon

79
Adding an Interactive Icon

•Uncheck Customer Scatterplot because our Source


Sheet is Map of Europe
•Switch from Menu to Select
•Write Filter name as “ Select geography”

80
Adding an Interactive Icon
• We can check that by movement on Map that
as per our movement scatter plot is changing
that means Filter has been applied.

81
Adding an Interactive Icon
• By pressing
CTRL button
while
selection of
countries
and state
you can do
multiple
selections as
below.
82
Adding an Interactive Icon
• To select a customer in particular area, you
can use rectangular selection feature:

83
Adding an Interactive Icon

Selection

Output

84
Adding an Interactive Icon
• Try all the remaining options in the selection
bar appeared earlier.

85
86
Thanks

87

You might also like