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 we find that when we use them, we 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.
We’re excited about the opportunity to provide a tutorial on how to create bullet graphs because while we find this to be one of the most powerful visualization types, it took some time to wrap our heads around how to make them when we were getting started with Tableau. Bullet graphs are a “Show Me” option in Tableau, but we found that this option was not always providing the results that we expected. Once we 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!
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, we are 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.
For this bullet graph, we are going to look at sales by category. In order to create a bullet graph, we 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, we are 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).
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. We were looking at sales by category, so we have placed the ‘Category’ dimension on the ‘Rows’ shelf. We have also fit the entire view for more visibility.
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:
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:
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, we 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. For a bullet chart that is also color coded by the index to prior year value, see this post on How to Show YOY Comparison with an Index Bullet Chart.
Not sure on your next step? We'd love to hear about your business challenges. No pitch. No strings attached.