Tableau Tutorial C
Tableau Tutorial C
A Dashboard can be defined as a collection of views, laid out to ensure efficient analyses
and comparisons. In this example, you will analyze the profit margin for each subcategory
using the Global Superstore dataset. To enhance the dashboard, you will supplement the
profit margin table with sparklines, a bar chart, and a map - each allowing you to examine
the data from a different angle.
Create a new sheet and drag both the Category and Subcategory dimensions to the Rows
pane. Since the Global Superstore dataset does not include a profit margin column, you will
need to create it. The formula is simply the sum of profit divided by the sum of sales. Once
your new measure (Profit Margin) is created, drag it to both the Text mark and the Color
mark. You may want to select the Square display instead of the default view, from the Marks
drop-down menu. This will make the profit margin comparison clearer.
It is possible to select a different color palette by clicking on the Color mark and its Edit
Colors option. Finally, you can hide the Field labels for both rows as well as the title of the
sheet by right-clicking on them.
1
● Drag Category and Sub-Category to the Rows pane.
2
● Drag the Profit Margin measure to the Text mark.
3
● Adopt the Square display (using the Marks drop-down menu).
4
● You can hide the Field labels for the rows (1/2).
5
3.2. The Sparkline Table
Create a second sheet (called, for example Sparkline Table). To create the desired chart,
start by adding several dimensions and measures. Drag Order Date to the Columns pane
and edit it so that every single month is displayed (e.g., March 2012, March 2013). For the
Rows pane, drag Category, Sub-Category, and Sales. You will then notice that some
sparklines are flatter than others (e.g., the Furnishings subcategory). To solve this problem,
right-click on the y-axis and select the Independent axis option from the Edit Axis pop-up
interface.
To increase the readability of your dashboard, you can hide all unnecessary/duplicate texts.
You can do so by hiding all headers and titles (right-clicking on them will display such an
option). You can also change the color and the thickness of the sparklines by using the Color
and Size marks. To remove the gridlines and column dividers, right-click on any sparkline
and select the option Format. The most relevant formatting changes can be done using the
Format Borders and the Format Lines sections.
6
● Some sparklines are flat. There is a potential issue with the scale of the y-axis.
7
● Hide titles and headers.
8
● Change the thickness of the sparklines by clicking on the Size mark.
9
● Remove the Column Dividers.
Create a third sheet for plotting a bar chart. Drag the Order Date dimension to the Columns
pane and display the monthly data (for each year). Then, drag the Sales measure to the
Rows pane to generate the chart. Since Tableau will automatically generate a line chart, you
will need to change it to a bar chart by using the drop-down menu (located in the Marks
pane). To enhance the clarity of the chart, you can hide the title, decrease the bar size (using
the Marks pane), and select a color similar to the palette used in your previous sheets.
10
● Generate a chart with Order Date (Dimensions) and Sales (Measures).
● Hide the title, change to a bar chart, and increase the space between the bars.
11
● A potential bar chart will look as follows:
Your fourth sheet will present the volumes of sales for each U.S. state. First, double-click on
the dimension State to generate a map. Depending on your computer, Tableau might
exclusively show one focal country (e.g., Canada’s provinces and territories), or all states
found on the dataset, regardless of the country of origin. To display only U.S. states, click on
the brown button at the bottom right of the main pane and select Edit Locations. From the
Country/Region drop-down menu, select the option Fixed (with United States).
Unfortunately, all the blue dots on the map have the same size. Drag the measure Sales to
to the Size mark to assign a different size to each blue dot (corresponding to a U.S. state)
depending on the volume of sales. Finally, you can polish the map by hiding the title.
12
● Double-click on State (Dimensions) and click on the button at the bottom right
(assuming that states from other countries than the U.S. appear).
13
● From the drop-down menu, select the option Fixed (with United States).
● Drag the measure Sales to the Size mark to increase the size of the blue dots and
hide the title of the map.
14
● The final map could potentially look as follows:
The first step in designing a Tableau dashboard is to create a dashboard sheet (see the icon
tab with the four quadrants at the bottom). Clicking on this icon will generate a blank
dashboard, which you can fill in by dragging the four sheets you previously created. You can
follow the layout outlined below or create your own. You may want to remove the legends
from both Sales Location and Detailed Sales sheets, as they occupy a large amount of
space. In the same vein, you may want to hide the titles from each graph.
If the graph displayed in the Detailed Sales sheet is hard to read in your dashboard, you can
change the bar size in the original Detailed Sales sheet. Any changes you make on the
original graph will instantly be reflected on the dashboard.
To align each subcategory with the right sparkline in your dashboard, right-click on your
Base Table graph and select the option Entire View under the Fit menu. Add a title by
dragging a text object (located at the bottom left) to the dashboard. You can then finalize all
the relevant formatting decisions (e.g., make sure that your text box does not take too much
space in the dashboard).
15
● Drag the sheets to the dashboard and hide the legends.
16
● Change the bar size directly in the original sheet (1/2).
17
● Select the option Entire View under the Fit menu.
18
● Give your dashboard a relevant title.
A dashboard is a great tool due to the interconnectivity between the different tables and
graphs displayed on the same sheet. For instance, you could use your Base Table as a filter
for the dashboard (a filter will restrict the data to a specific sub-sample and will affect all the
charts displayed on the dashboard). To do so, you can click on your table and on the filter
icon located at the top right. You can then click on a specific category (or subcategory) to
choose the desired subsample of the data for all the graphs displayed on your dashboard.
For example, if you click on the Furniture category, you will see that only four sparklines
appear (since four out of the 17 subcategories belong to the Furniture category). The
bubbles in the Sales Location chart (i.e., the map) and the bars in the Detailed Sales plot will
also be updated accordingly (only displaying the data from the Furniture category).
19
● Your dashboard without filters.
20
● Select the Furniture category. All three other tables will update accordingly.
It may be useful to require that only specific charts are affected by the filter (as opposed to
all the charts). To specify which graph(s) will be affected by your new filter, you can use
Tableau’s Actions, which can be found on the Dashboard tab at the top of the window (see
the figure below). Once you add a filter action, you will need to design your filter. For
example, you can select your Base Table as the source sheet (i.e., the sheet from which you
specify the subsample of data) and pick Sales Location and Detailed Sales as target sheets
(i.e., the sheets that will be affected by your chosen subsample). Since we did not select the
Sparkline table as a target sheet, the data displayed in the Sparkline table will not be
affected by the filter and will remain as is. In most cases, you may want to select the “show
all values” option.
21
● Create an action.
22
● Select the right source sheet and target sheets.
● Clicking on a subcategory will now only affect your map and your bar chart.
Another example can be to restrict your sample to a specific time period. For instance, you
can use the Detailed Sales chart as a filter by clicking on the Use as Filter icon (see the
figure below). At this point, you can manually select the specific time periods you are
interested in. For example, you can decide to focus on the first quarter (January to March)
23
for 2013. In this case, this selection will affect all the data displayed on the Base Table, the
Sparkline Table, and the Sales Location Table (all three are considered by default as target
sheets).
● Use your Detailed Sales chart as a filter to focus on the data from a specific time
period.
24