Bulltet Charts
Bulltet Charts
Day 12
Bullet Charts:
The bullet chart in simple words is a combination of bars and reference lines. Bullet
charts are advanced bar charts that provide an additional point 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.
Bullet graphs are used to compare one value, represented by a horizontal bar, to
another value, represented by a vertical line, and relate those to qualitative ranges.
Let us suppose that we want to compare two measures, actual sales and expected
sales. So here, our primary measure meaning the dark line will be actual sales and
the reference line will be expected sales. Using a bullet chart, we can easily have
these two measures on a single bar of bullet charts. Then we can see whether or not
our actual sales are lagging, equaling, or exceeding the expected sales value using
the visualization.
Step 1: Open a blank/new sheet in a Tableau workbook with your dataset uploaded.
We select one dimension field; S ub-category and two measure fields; Profit and
Sales from the list of fields. Then, we select the bullet graph option from the
visualization pane. Click on Show Me option to access the visualization pane.
Step 2: Now, we will get a bullet chart which will have bars with grey lines in the
background and blue lines on top of that. The grey lines are known as reference
lines and the blue ones are the actual lines. So, from our two selected measures,
one will become the reference line and another will become the main line (blue).
The reference line field is the one that is shown on the Detail card of the Marks
section.
We can change or swap the two fields with each other. To make the reference line
field as the main line field, right-click on the x-axis and select Swap Reference
Line Fields option. Also, we can change the view type from Standard to Entire View
so that the chart covers the entire sheet.
Step 3: Next, we set the aggregation type for our line. We select it as Average. You
can also set the bar type, scope, line, label, tooltip, formatting of the bars and lines,
etc from the editing box in t ableau. To access this editing box, right-click on the
x-axis and select the Edit Axis option.
This opens a dialog box from where you can edit and format the computations of
the reference line.
By selecting the percent average option, the reference line divides itself into three
segments. When you hover the cursor over the reference line, you will first see a
50% of Average Profit mark with the value.
Further ahead on the reference line, you will find 80% of the Average Profit mark
with the value. In this way, we can see the main values on the blue bar and
reference, more detailed values on the reference line.
Step 5: Thus, our final bullet chart showing sales and profit values for each
electronics sub-category or brand is ready. When you hover over any of the
individual bars, you will get more information regarding it such as sub-category
name, total profit value for the sub-category and total sales for the sub-category.
Remember, 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.
How to create a bullet chart using bar chart and reference line?
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 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:
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.
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:
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:
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.