The Tableau Bullet Chart is one of the most useful chart types in the corporate environment.
A Bullet Graph is a standard bar chart and uses reference lines to track against a secondary number.
An example where a bullet chart is very useful is to compare performance against budget.
Or more sophisticated, use a bullet graph to track performance against budget AND against last year.
How to create a bullet graph in Tableau
It’s actually very simple to create a bullet chart in Tableau. In this example we compare Sales from 2019 against Sales from 2018 for each Country. In addition, we also compare if we are above or behind budget.
For a bullet chart use separate calculated fields for each time period. In this example that means a calculated field for 2018 Sales and 2019 Sales.
[Sales 2018]: IF YEAR([Order Date])=2018 THEN [Sales] END
[Sales 2019]: IF YEAR([Order Date])=2019 THEN [Sales] END
Now there are 2 options to show the YoY.
1. Dual Axis
2. Bar Chart with the previous year (2018) as a Reference Line.
1. Bullet Graph using Dual Axis
- Put [Country] on Rows
- Add the 2 new Sales calculated fields, [Sales 2018] and [Sales 2019] to the Columns shelf. Make sure it’s in that order; this means 2019 will fit on top of 2018, which is what we want.
- If necessary set both Marks to be a Bar.
- Set it to be Dual Axis and Synchronise Axis. Right-click on either of the axes to Synchronise Axis.
- Alter the Size of the [Sales 2019] bar. This bar should be thinner than [Sales 2018]; we want to see both bars.
- Alter the colour of 2018. A light grey colour works well.
2. Bullet Graph using Reference Lines
- Put [Country] on Rows
- Put [Sales 2019] on Columns
- To use [Sales 2018] as a reference line put it to Detail
- Right-click the X-axis and Add Reference Line
- The reference line can be a Distribution and is Per Cell
- Computation is your choice, there are options and it depends on what you want to show. In this example I have chosen the Value as Percentages and set them as 75 and 100. Therefore the shading differs slightly before 75% and after 75%. These are %s of [Sales 2018]
- To show the shading before 75% select Fill Below. To continue the shading after 100% select Fill Above.
- Choose whatever colour suits best
- To only show 1 bar for 2018, as with the above Dual Axis example, use Percentages and set a value of 100. Or use Percentiles and a value of 100.
Add the Budget target
To finish add the budget. This is also a reference line.
Begin by putting the budget field to Detail. Then right-click the X-axis and Add Reference Line.
This time the reference line will be an actual line. The Scope should be Per Cell. The Value is the Sum of the Budget field.
Finish the bullet chart by adding some colour
Finally to add some further visual information. To have a quick idea if the [Country] is above or below budget create another calculated field:
[isAboveBudget]: SUM([Sales 2019])>SUM([Budget])
Put it on the Colour shelf of the [2019 Sales] bar. Now, at a glance, it’s clear which countries are above their budget.