Bullet Chart Exercise 1
Last updated
Last updated
We’ll build a bullet graph using the Chapter 3
workbook, which contains the Hospital Visits
and Hospital Goals
spreadsheet data sources. We’ll use these two data sources to visualize the relationship between actual and target minutes to service as you follow these steps:
Navigate to the Revenue Per Department (Bullet Chart) sheet.
Create a basic bar chart of the total Revenue per Department. You can accomplish this by dragging Department to Rows and Revenue to Columns.
Sort Department from highest to lowest.
Filter Date of Admit by Year and keep only 2019
data. At this point, your view should look like this:
Figure 3.8: Interim steps in creating the bullet graph
In the Data pane, select the Goal field under the Hospital Goals.csv
table.
Open Show Me and select the bullet graph option. At this point, Tableau will have created a bullet graph using the fields already in the view and the Goal field you selected in the data pane.
When you use Show Me to create a bullet chart, you may sometimes find that Tableau uses the fields in reverse order from what you intend (with the wrong measure defining the axis and bars, and the other defining the reference line). If this happens, simply right-click the axis and select Swap Reference Line Fields:
Figure 3.9: The Swap Reference Line Fields option
The completed bullet chart should look like the following:
Figure 3.10: The complete bullet graph
The completed bullet graph allows us to see which departments have met their goals and which are behind. Next, let’s consider how we can highlight this even more.
With bullet charts, it can be helpful to visually call out the bars that fail to meet or exceed the threshold. We’ll look at calculations in depth in the next chapter, but for now, you can complete this example with the following steps:
Use the drop-down arrow in the Data pane and select Create Calculated Field…:
Figure 3.11: Creating a calculated field
Name the calculated field Goal Met? and add the following code:
Click OK and drag the new Goal Met? field from the Data pane and drop it on Color.
The calculation returns true
when the Revenue
value for a department is greater than the goal value, and false
otherwise. With the calculated field on Color, it becomes very easy to see which departments have met the 2019 goals:
Figure 3.12: Departments that have met their goal are highlighted in this bullet chart
Color is one of the strongest ways to get attention with your visualizations. Use color with intent. Decide whether you want to highlight good or poor performance.