Tableau 201: How to Make Bullet Graphs
How to Make Bullet Graphs is the third of a three-part post from “Use Corporate Chart Types”, tip nine in the Data-Driven Storytelling: Tips from an Iron Viz Champion series.
Bullet graphs are a variation of the bar chart invented by Stephen Few. Bullet graphs are one of my go-to chart types and are often featured prominently throughout my dashboards because I find that when I use them, I hear the question, “So what?”, less often. As powerful as bar charts are at communicating data, when viewed in a vacuum – or without additional context – their comparisons are limited to only the fields that are displayed in the chart. Bullet graphs improve on the bar chart by providing additional points of comparison. For example, in addition to showing a bar for widget sales, a bullet graph would also include a point of comparison that shows either last year’s sales or a target sales amount. Further, bullet graphs will include shading to illustrate how close your sales number is to last year’s number or your target.
I’m excited about the opportunity to provide a tutorial on how to create bullet graphs because while I find this to be one of the most powerful visualization types, it took me some time to wrap my head around how to make them when I was getting started with Tableau. Bullet graphs are a “Show Me” option in Tableau, but I found that this option was not always providing the results that I expected. Once I figured out that bullet graphs are simply a combination of bars and reference lines, it was much easier for me to create them. The good news is that if you can create a bar chart in Tableau, you can create bullet graphs!
Looking to maximize the return on your company's investment in Tableau? Learn about our Tableau Training.
How to Make Bullet Graphs in Tableau
Bullet graphs are only an appropriate chart type to use if you have a point of comparison, such as last year’s performance or goals. For this walkthrough, I am using the Superstore sample dataset that comes prepackaged with every download of Tableau. This dataset does not contain goal information, so my point of comparison will be last year’s performance.
Step 1 – Break out this year’s performance and last year’s performance.
For this bullet graph, I am going to look at sales by category. In order to create a bullet graph, I will need to break out this year’s sales and last year’s sales. The Superstore dataset only runs through 2013 and 2013 outperformed 2012 in every category, so for the purposes of this tutorial, I am going to pretend that this year is 2012 and last year was 2011.
The isolation of sales for these two years is achieved through calculated fields. To create a field that contains only 2012 sales, right-click on the ‘Sales’ measure and select “Create Calculated Field”. This approach provides a small shortcut because sales is already part of your formula when the ‘Calculated Field’ dialog box opens. Once the dialog box is open, enter a formula like this to isolate the current year’s sales:
IF YEAR([Order Date]) = 2012 THEN [Sales] END
Repeat the above step to isolate last year’s sales (in this case, 2011).
Step 2 – Create a bar chart that will serve as the foundation for your bullet graph.
Create a bar chart as you normally would by placing the current year’s sales on the ‘Columns’ shelf and a dimension on the ‘Rows’ shelf. I am looking at sales by category, so I have placed the ‘Category’ dimension on the ‘Rows’ shelf. I have also fit the entire view for more visibility.
Step 3 – Add a reference line for last year’s sales.
In order to use last year’s (2011) sales as a reference line, the isolated calculation that you created in Step 1 needs to be a part of your view. Even though it is not yet visible, you can make ‘Last Year’s Sales’ part of your view by dropping the field on your ‘Detail’ marks card. Notice that when you place ‘Last Year’s Sales’ on the ‘Detail’ marks card, your view does not change, but now that data is available to use as a reference line.
To create a reference line, right-click on the X-axis and select “Add Reference Line, Band, or Box…”. Change ‘Value’ to ‘SUM(Last Year’s Sales)’ and ‘Label’ to ‘None’. The most important change is to toggle the ‘Scope’ radio button from ‘Per Pane’ to ‘Per Cell’. This will give you a reference line for each distinct category. You may also choose to make the line a bolder color and heavier weight to make it stand out on your view. After the appropriate selections, your reference line dialog box should look something like this:
At this point, your view should look like this:
Step 4 – Add a reference distribution for last year’s sales.
At this point, you have already added a comparison point to your bar chart which shows whether each category is outperforming or underperforming last year’s sales. To take this a step further, you can add a reference distribution to show how close this year’s sales are to last year’s for the underperforming categories.
This reference type is slightly more complicated, but still easy to do in Tableau. To create a reference distribution for your bullets, do the following:
- As you did before, right click on the X-axis and select “Add Refernce Line, Band, or Box…”.
- Select ‘Distribution’ at the top.
- Change the ‘Scope’ from ‘Per Pane’ to ‘Per Cell’.
- This is the trickiest part. You need to change the ‘Computation Value’ from ‘This Year’s Sales’ to ‘Last Year’s Sales’. You can do this by clicking the down arrow on the ‘Computation’ > ‘Value’ box. Then where it says ‘Percent of:’, make the appropriate selection. Notice that the default percentages are 60% and 80%. This means that it will show shading for 0 – 60% of last year’s sales and 61 – 80% of last year’s sales.
- Change ‘Label’ to ‘None’.
- Check the box that says ‘Fill Below’. This will provide the correct shading when you apply the reference distribution.
After hitting okay, you should see a well-done bullet graph that looks like this:
Now that you have a reference distribution, you can quickly determine not only whether or not each category is on pace with last year, but you can see how far behind pace underperforming categories are relative to a year prior. For example, I can see that my first category, Appliances, is at just over 80% of last year’s sales for that same category.
Another great application of bullet graphs is to use them to show progress toward goals. In that case, the bars would be current year’s sales, and the reference lines and distributions would be your goals. By using year-end goals, you can track movement throughout the year and determine which categories are progressing the fastest. This type of context may be enough to help you pivot resources to help underachievers catch up – actionable insight that may not have come from a bar chart alone.