Tableau Exercise: Building a Sales Heat Map Table with Totals
I practiced creating a simple Tableau visualization of sales data based on a video in a Udemy course I've been following, 2024 Tableau Certified Data Analyst Training. I actually went through the exercise a few times, because it reinforces a couple of useful techniques: Adding totals and turning a table into a colored heat map.
Here's how it's put together:
- Download and connect to the Superstore Sales data.
- Begin building the visualization:
- Select and drag
Order Date
to the "Rows" shelf. - In the "YEAR(Order Date)" pill, select the plus sign to add the sales quarter data.
- Select and drag
Category
to the "Columns" shelf. - Select and drag
Sales
to the "Label" mark. Note that if you try to add it to the "Rows" shelf, the sales data will instead render as bar graphs. - In the ribbon, from the drop-down menu, select
Entire View
.
- Select and drag
- Add colors:
- Select and drag
Sales
to the "Color" mark. - To color the table cells instead of the text, under "Marks", select
Square
. - Select the
Color
mark and thenEdit Colors
as desired; I choseOrange-Blue Diverging
and checkedReversed
.
- Select and drag
- Add sales totals:
- Select the
Analytics
tab. - Select and begin dragging
Totals
to the visualization. - In the box that appears, drop "Totals" onto "Row Grand Totals".
- Repeat the steps to drop "Totals" onto "Column Grand Totals".
- Select the
- Format sales numbers:
- Under "Marks", right-click either of the
SUM(Sales)
pills and selectFormat
. - In the "Pane" tab, from the "Numbers" drop-down, select
Currency (Custom)
. - Remove the decimal places and change the display units to
Thousands (K)
.
- Under "Marks", right-click either of the
- Hide unwanted titles and labels:
- Right-click the
Sheet 1
title and selectHide Title
. - Right-click the
Year of Order Data
label and selectHide Field Labels for Rows
. Do the same for theCategory
label.
- Right-click the