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.


How to Make Bullet Graphs

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!

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, 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.

Step 1 – Break out this year’s performance and 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

1 - Bullet Graph Formula for Current Year Sales

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. 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.

2 - Bar Chart Foundation for Bullet Graphs

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:

3 - Bullet Graph Last Year Sales Reference Line

At this point, your view should look like this:

4 - Bullet Graphs with Last Year Sales

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:

  1. As you did before, right click on the X-axis and select “Add Reference Line, Band, or Box…”.
  2. Select ‘Distribution’ at the top.
  3. Change the ‘Scope’ from ‘Per Pane’ to ‘Per Cell’.
  4. 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.
  5. Change ‘Label’ to ‘None’.
  6. 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:

5 - Final Bullet Graph

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

Written By


Evolytics

This post is curated content from the Evolytics staff, bringing you the most interesting news in data and analysis from around the web. The Evolytics staff has proven experience and expertise in analytics strategy, tagging implementation, data engineering, and data visualization.