6 Formatting
6 Formatting
Exercises – Formatting
The Tableau Formatting window lets you change fonts, add banded shading, and modify the lines,
colors, grid, and numbers and dates. Apart from these common formatting options Tableau also
provides mark labels and annotations. Mark labels are the values shown next to each point in a view and
annotations call attention to specific marks, points, or areas in a view.
Business Scenario
Aspire Public School Management wanted to provide data visualization and analysis capabilities to their
teachers so that they can build visualizations at the end of each month to display what their students
are learning and how they are performing on standardized tests. They chose Tableau to generate these
visualizations, as Tableau enables people to manipulate data without advanced training, so it is often
used by employees beyond data analysts. Now using simple formatting techniques the teachers can
manipulate data and can generate visualizations in Tableau.
Overview
In this exercise you will:
Use the pre-created Yearly State Sales View workbook and apply formatting to it.
Bold the grand totals displayed across the rows and columns.
Change the alignment of Year of date to center.
Change its date type to 2-Digit.
Apply blue color banding on the rows and change the display color of states to dark blue.
Apply borders to the worksheet’s headers, cells and panes.
Rename the sheet as State Sales Report.
The first few rows of the final result should resemble the following image:
Detailed Instructions
Open worksheet
4. On Analysis menu, point to Totals and select Show Row Grand Totals.
5. On Analysis menu, point to Totals and select Show Column Grand Totals.
6. On the Format menu, select Font.
Note: The Format pane is displayed on the left-hand side.
7. In the Format Font pane, click the Sheet tab.
8. On the Sheet tab, under Grand Total, in the Pane drop-down, click the bold icon present on
the format bar.
9. In the Format Font pane, in the Fields drop-down list, select YEAR (Date).
Apply Banding
15. On the Sheet tab, under Row Banding, in the Pane drop-down, select color as shown below:
16. In the Format pane, in the Fields drop-down list, select State.
17. In the Format State pane, click the Header tab.
18. On the Header tab, under Default, in the Font drop-down, select color as shown below:
Apply borders
21. On the Sheet tab, under Default, in the Cell drop-down, select the continuous line as shown
below:
Rename Sheet
24. Double-click the sheet name at the bottom of the worksheet and type State Sales Report.
25. Save the worksheet by clicking save icon on the toolbar.
Note: Keep the workbook open to perform next exercise.
Overview
In this exercise you will:
Create a view to display quarterly sales data using the Lines (Continuous) Show me display type.
Display the maximum and minimum mark labels.
Display a mark type annotation for the Eastern market on July 1, 2012.
Edit the annotation to display:
- Light grey shadow color
- Dot with end size 3
Resize the annotation if it overlaps with view.
Apply a title to this sheet in dark grey color.
Rename the sheet as Quarterly Sales Graph.
Note: You will perform this exercise by creating a new sheet in the existing worksheet. Use Sample –
Coffee Chain (Access) sample data source.
Detailed Instructions
Create View
1. Click the new sheet tab at the bottom of the Yearly State Sales View workbook.
2. In the Data pane, under Dimensions, locate and click Date. Holding the CTRL key, select Market
dimension and Sales measure.
3. Click Show Me on the toolbar.
4. Select the Lines (Continuous) view as shown below:
5. In the Columns shelf, click the YEAR(Date) drop-down, and select Quarter as shown below:
Display Annotation
10. Right-click the mark corresponding to 2012 Q2 for East market, point to Annotate, and select
Mark.
11. In the Edit Annotation window, keep the defaults and click OK.
12. On the Format menu, select Annotations.
13. In the Format Annotations pane, under Box, in the Shading drop-down, select the color as
shown below:
14. Under Line, in the Line End drop-down, select Open Arrow, and drag the End Size slider to the
third mark as shown below:
Resize Annotation
Sheet Title
Rename Sheet
24. Double-click the sheet name and type Quarterly Sales Graph.
Save Worksheet
25. Save the worksheet by clicking the save icon on the toolbar.
Business Scenario
Discount is a common business practice that can help you to move stock, attract new customers, or
reach sales targets during a slow sales period.Thus, to increase his sales a Marketing Manager of a well-
known brand wants a regional data analysis sheet showing the items and their category’s sales
performance depending on their respective discounts.
The Marketing Manager also wants the items that include no discounts should be formatted properly.
He wants to display the departments and categories in a different orientation. Apart from this, the
manager wants the functionality that will help him to view highlighted data for each selected region.
Overview
In this exercise, you will:
Detailed Instructions
1. On the Home page, under Saved data sources, click Sample – Superstore Subset (Excel).
2. In the Data pane, under Dimensions, locate and drag Department, Category and Item to the
Rows shelf.
3. In the Data pane, under Dimensions, locate and drag Order Date to the Columns shelf.
4. In the Data pane, under Measures, locate and drag Discount measure to the Text in the Marks
card.
5. On the Analysis menu, point to Table Layout and select Show Empty Columns.
6. Now, to format the nulls, on the Marks card, click the drop down for AVG (Discount) and select
Format.
7. In the Format AVG (Discount) pane, in the Pane tab, under Special Values, in Text box, type 0.0%.
8. Notice that all null values are replaced with 0.0% in the view.
9. Now to format the row labels, on the Analysis menu, point to Table Layout and select Advanced.
10. In the Table Options window, under Rows, in the Maximum levels of row labels box, type 3.
11. In the Maximum levels of horizontal row labels box, type 1.
12. Click OK.
13. Notice the Department and Category labels have been arranged differently:
14. Remove the Item dimension from the Rows shelf and drag Sales measure to the Columns shelf.
15. Also, drag the Region dimension to the Color in Marks card.
16. Your view should be displayed as follows:
17. Notice in the Region pane below the Marks card, the Highlight Selected Items icon is selected by
default. So whatever regions you select, categories belonging to those regions will be highlighted in
the view.
18. From the Region pane, select two or three regions using the Ctrl key.