Online tableau training, tableau tips, & video tutorials
How to Make Bullet Graphs in TableauPreview
Convert your bar charts into useful gauges
Avoid the question, “So What?”, by adding valuable context to your bar charts. This video will show you two different ways to create bullet graphs that compare the current month’s performance to a comparison.
Hi, this is Ryan with Playfair Data TV. And in this video, I’m going to show you how to make one of my favorite chart types, which is a bullet graph. Bullet graphs are so great because it’s an extra way to add context to a bar chart. Bar charts already work well because they leverage the pre-attentive attribute of height or width or length to help us analyze data and compare categorical data.
But bullet graphs take this a step further and add some context in the form, usually, of some type of comparison. Whether that’s a goal, typically, it’s period over period. If you’re not familiar with the bullet graph, it looks like this chart on the screen. With this particular one, I’m comparing the 2016 sales amounts to the sales amounts the prior year by sub-category.
We will use the Sample Superstore dataset to make a similar chart. Let’s pretend that the Sample Superstore dataset only comes with one year of data because I’m going to take a little bit of a short cut on this calculated field. But we’ll say that we want to compare May sales to April sales. So we’re pretending that May’s the current month and April is the prior month.
I first need to isolate sales for the month of May and sales for the month of April. One way to write this formula would be SUM IF Month of Order Date equals 5, then Sales. END. That isolates May’s sales or any sales that happened in the fifth month of the year. I’m going to click OK.
Now that I’ve got May’s sales, it’s very easy to create April’s sales. I can just right click on May sales and duplicate that calculation. Right click on the newly created copy and click Edit. And just make a couple of tweaks. I’m going to change the name from May to April. And I’m going to change the 5 to a 4.
So at this point, we have isolated May’s sales and April’s sales. Now we’re ready to make our bullet graph. You can create bullet graphs with Show Me by pre-selecting your current period as well as your comparison amount or measure. I’ve selected both May sales and April sales. And if I go to Show Me, bullet graphs is one of the options I can choose.
It’s important to note there at the bottom of the Show Me menu, it says for bullet graphs, right click the continuous axis to swap reference lines. The reason it’s telling you to do that is the results can be a little bit unpredictable. Sometimes the bars will be the comparison and sometimes they’ll be the current amount. So that’s not quite what you want.
Let’s see what it did for us if we chose May sales. It looks like this time it did get it right. It put May sales as the axis, and then our comparison is April. And if I break this down further now by sub-category, we’ll be able to see the month over month sales by sub-category.
So it got it right this time. But if April sales was on our axis and May sales was here in the Detail, there would be one more step. You’d have to right click on the axis and click Swap Reference Line Fields. So it’s pretty easy to make with Show Me, but I want to build it for you once manually to kind of show you under the hood on what Tableau is doing.
To start, I’m going to make a bar chart. May Sales by Sub-Category. So I’m just going to double click May Sales and double click Sub-Category. I will also flip the orientation and sort these, which is a little bit better practice with a bar chart. I’ll also fit the entire view so we can see this a little bit better.
Bullet graphs are made with reference lines. There’s two different reference lines added to the view. And you can add a reference line by simply right clicking on an axis and clicking Add Reference Line. I’m purposely going to show this to you the wrong way so that I can show you another use of the Detail Marks Card.
If I click Add Reference Line, what I’m looking for is April Sales because that’s what I’m wanting to reference within each one of my cells for sub-categories. The values that I have available to me to add as reference lines are in this dropdown.
If I click that dropdown. I see three things but I don’t see April Sales. I see May Sales, Profit Bin Size (Parameter), which comes with the sample dataset, and Top Customers (Parameter), which also comes with the dataset. I don’t see April Sales, but it’s because it’s not on my view anywhere.
I can add it to the view by clicking OK to close this temporarily. And I’m going to put April Sales onto the Detail Marks Card. You don’t see the view change at all. But now if I go edit that reference line that we accidentally added, and choose the dropdown for which value is being visualized as the reference line, now we see April Sales.
I click April Sales. The default scope of a reference line is the Pane. So we’ve only got one pane, so that line’s going across the entire table or pane at the moment. We want to change the scope to Per Cell so that we can see April Sales at every individual sub-category.
So I click Per Cell. You’ll see April Sales for each of the 17 sub-categories. With bullet graphs, I also like to customize the label. There’s a lot of redundant ink on this view. So I’m going to change the label from Computation to None just to clean up this view a little bit.
I also typically make the reference lines a darker color or maybe a heavier weight or some brighter color so that they stand out a little bit more. I’m going to click OK. All right, so we’ve now made reference lines. The bars represent the current period, the lines represent the comparison period, which in this case is April.
With me, I like to stop here. This is already a great enhancement of a bar chart. And how you might read this, just to give you a couple of examples. The bar chart was good. You know, I might have been focused on copiers because it made the top three. The reason that the bullet graphs made this a little bit better is I have additional context.
I know not only that Copiers was in third place, so I’m feeling pretty good about it, but that reference line is showing me that more than any of the others, Copiers did very well month over month. That’s an insight that I did not have visibility into before I made this bullet graph. Machines is another interesting one.
It’s in the top five, but if you look at its month over month performance, it did pretty poorly. You know, that’s really important context that we just, again, didn’t have visibility into before. If we stopped short at a bar chart, we’d see that Machines is in the top five. But we wouldn’t know that it had fell so far month over month.
For me, that’s enough information. But I want to share the original vision of the bullet graph because it was invented by a modern author who is still speaking about this stuff and writing about this stuff. So out of respect for Stephen Few, who invented the bullet graph, I want to show you one more reference line that he recommends adding to your bullet graphs.
We’re going to right click on the axis a second time and add a second reference line. This reference line will be a distribution. So I’m going to click Distribution. And the default distribution is 60% and 80% of average. The reason that is the default is because of bullet graphs. So that is the correct distribution. But we need to change what that average number is.
So I’m going to click into this dropdown. And instead of having it be the average of May Sales, we’re going to have it be the average of April Sales. You saw that shift a little bit. Just like the individual lines, we want to change the scope to be Per Cell. So I’m going to click Per Cell.
Obviously, that is way too much redundant ink. So I’m going to turn off those labels. Instead of Computation, I’m going to click None. And this is OK, what we’re currently seeing. That gray shading represents 60% to 80% of each of the red lines. But with bullet graphs, what you typically do is click this box to Fill Below.
And you’ll see the shading change a little bit. What we’re looking at now is the dark gray goes from 0 to 60, and the lighter gray goes from 60% to 80% of the comparison month. That’s good for now. I’m going to click OK.
And that shading is just meant to give you a little bit of additional context. So let’s go back to Machines to show you how you would leverage that shading. We started with just the bar chart. We saw that Machines was in the top five, so we might have felt pretty good about it.
When we added the reference line for the comparison point, we see that Machines is down pretty significantly month over month. Now, with the shading, we can see and it helps us kind of quickly do the math. We can see that Machines is just over 60% of what it was last month. That’s about 62%, 63%.
But bullet graphs are just a great way to enhance a bar chart and add additional context that will help you create comparisons in your analysis.
This has been Ryan with Playfair Data TV – thanks for watching!
Related video: 3 Ways to Make Beautiful Bar Charts in Tableau
Related video: Two Types of Data Stories and Tactics for Handling Each
Related blog post: How to Make Bullet Graphs in Tableau
Related chapter: Practical Tableau – Chapter 26 – How to Make Bullet Graphs
Chart Types Videos
- 3 Ways to Make Beautiful Bar Charts in Tableau
- 3 Ways to Make Lovely Line Graphs in Tableau
- How to Make Dual-Axis Combination Charts in Tableau and Some Creative Applications
- Exercise: Dual-Axis Combination Chart
- Tips for Formatting Text Tables in Tableau
- 3 Ways to Make Handsome Highlight Tables in Tableau
- 3 Ways to Make Stunning Scatter Plots in Tableau
- Exercise: Make a Scatter Plot in Tableau
- An Introduction to Mapping in Tableau
- Exercise: Dual-Axis Map in Tableau
- How to Make Sparklines in Tableau
- How to Make a Timeline in Tableau
- How to Make Dynamic Bump Charts in Tableau
- How to Make Bullet Graphs in Tableau
- How to Make a Waterfall Chart in Tableau
- Two Ways to Make Dynamic Slope Graphs in Tableau
- Two Ways to Make Dumbbell Charts in Tableau
- How to Make Better Dumbbell (DNA) Charts in Tableau
- Why and How to Make Jitter Plots in Tableau
- How to Make Unit Charts in Tableau
- How to Make Unit Histograms in Tableau
- How to Make Connected Scatter Plots in Tableau
- How to Make Leapfrog Charts in Tableau
- How to Make Dot Plots with Performance Ranges in Tableau
- Exercise: Create a Ranged Dot Plot in Tableau
- How to Make a Biggest Movers Chart in Tableau