Data Visualization Exercises
If you and your group have any questions or get stuck while working through this in-class exercise, please ask the instructor for assistance. Enjoy!
We are continuing to use the Global Superstore Orders 2016 Excel spreadsheet. In the previous activity, you learned how to build visualizations in Tableau. To create a new visualization, click the New Worksheet icon
on the sheet tabs at the bottom of the window. You can then select which variables (dimensions or measures) you want to assign to rows, columns, or other characteristics of the visualization (e.g., colour and size), choose a visualization type, and make any additional adjustments as needed.
In this activity, we will create different types of visualizations in Tableau to explore different trends in the data. In the next activity, you will learn how to combine these visualizations into a single interactive dashboard.
1. Treemap: Total Profit by Region
- Create a new worksheet by clicking the
icon at the bottom of the window. -
From the Dimensions list, right-click Region and drag it to the Rows shelf

- From the Measures list, right-click Profit and drag it to the Columns shelf. Tableau will default to SUM(Profit) and display a bar chart showing both negative and positive profits
- Click the Show Me icon
in the top-right corner of the screen to view the visualizations Tableau recommends - Select Treemap (4th option down on the left)
- A grey 3 negative indicator should appear in the bottom-right corner. Click this indicator to view the two options for dealing with the negative values: Filter Data or Use Absolute Values
- Select Use Absolute Values. The negative values will appear as the same size as positive values, but in a different colour
- Rename the worksheet by right-clicking the Sheet 2 tab at the bottom of the window and selecting Rename. Rename it Profit by Region Treemap. The visualization title will automatically update to reflect the new worksheet name. You can right-click the visualization title if you would like to edit it further
- Remember: If you make a mistake, use the back arrow at the top-left of the toolbar to undo your last action
- Your final output should look like this:

2. World Map: Total Sales by Country
- Create a new worksheet by clicking the
icon at the bottom of the window - From the Dimensions list, right-click Country and drag it to the central Drop field here area in the middle of the screen. Select Country from the menu that appears
- To create a new measure, click Analysis in the top menu bar and select Create Calculated Field from the drop-down menu.
- Mac users: The Analysis menu is located in the Mac menu bar at the very top of the screen rather than in the Tableau application window
- The Calculation Editor will open. Rename the calculated field from Calculation1 to Profit per Item
- In the formula area, create the calculation for profit per item by dragging Profit from the Data pane into the formula area, typing
/, and then dragging Quantity into the formula area. Your calculation should divide Profit by Quantity
![]()
- From the Measures list, right-click and drag the new Profit per Item measure to Color on the Marks card (see image on the right). Select AVG(Profit per Item) from the menu that appears. Each country on the map will now be colour-coded based on the average profit per item
- To pan around the world map, click the black right-facing arrowhead in the map’s zoom controls and select the Pan option (crossed arrows). This allows you to move around the map
- We will now replace the calculated measure. Right-click AVG(Profit per Item) on the Marks card and select Remove

- From the Measures list, right-click Sales and drag it to Color on the Marks card. Select SUM(Sales) from the menu that appears
- Edit the map title and rename it Total Sales by Country
- Try changing the colours by clicking Color on the Marks card and selecting Edit Colors

-
Your final output should look like this:

3. Line & Bar Chart (Dual Combo): Quarterly Profit and Number of Sales by Product 2012-2015

- Create a new worksheet by clicking the
icon at the bottom of the window - From the Dimensions list, right-click Order Date and drag it to the Columns shelf
- From the menu that appears, select QUARTER(Order Date). Note: This option may not automatically appear
- Windows users: Click the small arrow next to YEAR(Order Date) and select Quarter
- Mac users: Click the + next to YEAR(Order Date) to drill down to Quarter
- From the Measures list, right-click Sales and drag it to the Rows shelf. From the menu that appears, hover over Measure and select Count
- From the Measures list, right-click Profit and drag it to the Rows shelf. Select SUM(Profit) from the menu that appears
-
From the Dimensions list, right-click Category and drag it to the Rows shelf
- Click the Show Me icon
in the top-right corner and select the Bar Line Chart option (3rd option up from the bottom-right). Click the Show Me icon again to close the menu - Rename the worksheet by right-clicking its sheet tab at the bottom of the window and selecting Rename. Rename it Quarterly Profit and Sales by Product

- Your final output should look like this:

- Click the Show Me icon
4. Building Sales Graphs for the Interactive Dashboard
Above, you learned how to create different types of graphs. Now we will create additional charts that we will later combine into a single interactive dashboard.
- Profit by Year Graph
- Go to Data Source in the bottom-left corner. From the Sheets list, drag the People sheet onto the same area as the Orders sheet. Because both tables contain a field called Region, Tableau will automatically create a relationship between the two tables using Region. This allows information from the People table to be used alongside information from the Orders table
- Click the New Worksheet icon at the bottom of the window to create a new worksheet

- From the People table in the Data pane, click and drag Person to the Columns shelf

- From the Orders table in the Data pane, click and drag Ship Date to the Columns shelf
- From the Orders table in the Data pane, click and drag Profit to the Rows shelf. Tableau will automatically use SUM(Profit)
- From the People table in the Data pane, click and drag Person to the Filters shelf. In the filter window that appears, click OK. This will allow you to filter the graph by a specific person
- From the Orders table in the Data pane, click and drag Ship Date to Color on the Marks card
- Click the Show Me icon
in the top-right corner and select the Side-by-Side Bar Chart option -
Rename the worksheet by right-clicking its sheet tab at the bottom of the window and selecting Rename. Rename it Profit by Year


- Your final result should look like this:


5. Orders by Person Graph
- Click the New Worksheet icon at the bottom of the window to create a new worksheet
-
From the People table in the Data pane, click and drag Person to the Rows shelf

- From the Orders table in the Data pane, click and drag Sales to Text on the Marks card. Tableau will automatically aggregate the values as SUM(Sales)
-
Rename the worksheet by right-clicking its sheet tab at the bottom of the window and selecting Rename. Rename it Orders by Person

-
Your end result should look like this:


6. Date/Category/Profit Graph
- Click the New Worksheet icon at the bottom of the window to create a new worksheet
- From the Orders table in the Data pane, click and drag Ship Date to the Columns shelf
- From the Orders table in the Data pane, click and drag Category to the Columns shelf
- From the Orders table in the Data pane, click and drag Sub-Category to the Columns shelf
- From the Orders table in the Data pane, click and drag Profit to the Rows shelf
-
Your Columns and Rows shelves should look like this:
.png)
- From the Orders table in the Data pane, click and drag Sub-Category to Color on the Marks card
- From the Orders table in the Data pane, click and drag Country to the Filters shelf. In the filter window that appears, select All and click OK
- Rename the worksheet by right-clicking its sheet tab at the bottom of the window and selecting Rename. Rename it Date/Category/Profit

- Your graph should look like this:
