How to Build a Bullet Chart in Tableau
In this article
Yes, you can create a Bullet Chart in Tableau without any extensions. It is built by combining standard bar charts, reference bars, and reference lines into a single view. You will need a data source with at least two measures: the one you want to plot (often called the "current" or "actual" value) and the target or benchmark value.
What You'll Need
- A Tableau Desktop license (the steps apply to both Desktop and Web Data Connector).
- A data source connected to your data. For this guide, imagine a simple data source with dimensions like 'Region' and measures like 'Sales', 'Target Sales', and 'Profitability'. You will need to know your target values.
- Basic knowledge of Tableau's calculated fields and the "Show Me" pane.
Step-by-Step
- Prepare your data: Ensure your data source has a measure for the value you want to track (e.g., 'Actual Sales') and a measure for the target or goal (e.g., 'Target Sales'). If your targets are static (the same for every row), they can be a constant number in a calculated field. If they vary by dimension (e.g., each region has a different target), they should be in the data source.
- Create a calculated field for the target:
- Go to the Data pane on the left side of the screen.
- Right-click in the empty space under the 'Measures' or 'Dimensions' section and select Create > Calculated Field....
- Give it a name, such as 'Target Sales'. In the calculation editor, enter the value or a formula that determines the target. For example:
10000for a static number, or[Target Sales]if you are using a measure from your data source. - Click OK to save it. A new calculated field will appear in your Measures list.
- Build the initial bar chart:
- Go to the Sheet tab at the bottom of the screen.
- In the Show Me pane on the right side, select the Bar Chart icon (it looks like a vertical cluster of bars). This is the default view for measures.
- Drag the measure you want to plot (e.g., 'Actual Sales') to the Rows shelf. This will create a vertical bar chart with the actual values.
- Drag a dimension you want to use for grouping (e.g., 'Region') to the Columns shelf. This will create a separate bar for each region.
- Create a reference bar for the target:
- Drag the calculated field you created for the target (e.g., 'Target Sales') to the Columns shelf, next to the dimension you just added.
- Tableau will create a bar chart for the target values. This is the first step in building the bullet chart.
- Convert the target bar to a reference bar:
- Hover over the target bar in the view (the one representing 'Target Sales'). You will see a small white circle with a plus sign (+) appear on its right side.
- Click and drag this small circle to the Rows shelf, placing it directly on top of the bar for the actual values. This will convert the target bar into a reference bar.
- Release the mouse button. The reference bar will now be overlaid on top of the actual bars. This is the core of a bullet chart.
- Format the reference bar:
- Right-click on the reference bar (the colored bar representing the target) and select Edit Formatting....
- In the Format pane that appears on the right side, go to the Bars tab.
- Click on the Background color well and choose a color that contrasts well with the actual bars. A dark grey or black bar is a common choice.
- Click on the Border color well and choose a color that matches the background. This will remove the border, making the reference bar look like a continuous background.
- Click OK to apply the formatting.
- Convert the actual bars to a dual-axis chart:
- Right-click on the actual bar (the one representing 'Actual Sales') and select Dual Axis....
- Tableau will create a second axis on the right side of the view. The two bar charts will now share the same space.
- On the new right-side axis, click and drag the Target Sales pill to the Filters shelf. This will hide the target bar, leaving only the actual bars on the primary axis.
- Format the actual bars:
- Right-click on the actual bar (the one on the primary, left-side axis) and select Edit Formatting....
- In the Format pane, go to the Bars tab.
- Click on the Background color well and choose a color that you want to use for the actual values. This should be a color that stands out against the reference bar.
- Click on the Border color well and choose a color that matches the background. This will remove the border.
- Click OK to apply the formatting.
- Add a reference line for the target:
- Go to the Analytics pane on the left side of the screen.
- Drag the Reference Line object and drop it onto the Rows shelf, placing it directly on top of the actual bars. Alternatively, you can right-click on the view and select Add > Reference Line....
- In the 'Reference Line, Band, or Box' dialog box, select Line from the 'Line' dropdown menu.
- In the 'Value' section, you have a few options:
- Aggregate Value: Use this if you want to show a single reference line for all the actual bars. You can choose to calculate it at the 'Row' level or 'Pane' level.
- Field: Use this if you want to show a reference line for each dimension in the view. For example, you could create a calculated field that returns the target sales for each region and use it here.
- Special: This option is not typically used for bullet charts.
- In the 'Label' section, you can choose to show or hide the label for the reference line. You can also change the font size and color.
- Click OK to apply the reference line.
- Format the reference line:
- Right-click on the reference line and select Edit Reference Line....
- In the dialog box, go to the Line tab.
- Click on the Color well and choose a color that will make the line stand out against the reference bar. A dashed line in a contrasting color is a common choice.
- Click on the Width slider and adjust it to make the line thinner or thicker.
- Click OK to apply the formatting.
- Final formatting and layout:
- Remove the secondary axis on the right side of the view by clicking on it and pressing the 'X' key on your keyboard. This will clean up the view.
- Go to the Format pane and adjust the font sizes, colors, and labels to make the chart readable and professional.
- Drag the Target Sales pill from the Columns shelf to the Filters shelf to remove it from the view entirely. This will leave you with a clean bullet chart showing the actual values and the target reference bar.
- Right-click on the Target Sales pill on the Filters shelf and select Show Filter. This will allow you to control which target values are displayed in the chart, which is useful if you have multiple targets for different scenarios.
Common Mistakes
- Not using a dual-axis: The most common mistake is failing to create a dual-axis chart. Without it, the actual and target bars will be separate, making the comparison difficult.
- Incorrectly formatting the reference bar: If the reference bar's border color does not match its background color, it will look like a separate bar instead of a background reference. This can be confusing for the viewer.
- Using a reference line instead of a reference bar: A reference line is a single line that goes across the entire view. A reference bar is a background bar that represents the target. For a bullet chart, the reference bar is the correct choice.
- Overlapping labels: If you have too many bars or labels, they may overlap, making the chart unreadable. Adjust the font sizes and the width of the bars to prevent this.
Tips
- Use contrasting colors: The actual bars and the reference bar should be in contrasting colors to make the comparison easy. A dark grey reference bar with bright blue or green actual bars works well.
- Hide the borders: Removing the borders from both the actual and reference bars makes the chart look cleaner and more modern.
- Use a dashed line: A dashed reference line is a good way to draw attention to the target without making it look too heavy.
- Add tooltips: You can add tooltips to the actual bars to show more information, such as the exact value or the percentage of the target achieved. To do this, right-click on the actual bars and select Tooltip....
- Use calculated fields for complex targets: If your target is not a simple number, you can use a calculated field to determine it. For example, you could create a calculated field that returns the target sales for a region based on its size or market share.
- Use the 'Pane' level for the reference line: When adding a reference line, choose the 'Pane' level if you want to show a reference line for each dimension in the view. This is useful for comparing multiple actual values against their respective targets.
Troubleshooting
- The reference bar is not showing: This is usually because the target bar was not converted to a reference bar. Make sure you dragged the small circle with the plus sign (+) from the target bar to the Rows shelf. If the target bar is on the Columns shelf, you may need to drag it to the Rows shelf first.
- The actual bars are on top of the reference bar: This is usually because the actual bars are on a secondary axis. Make sure you created a dual-axis chart. You can check this by looking at the axis labels. If there are two axes, you are on a dual-axis chart.
- The reference line is not appearing: This is usually because the reference line was not added correctly. Make sure you dragged the Reference Line object from the Analytics pane to the Rows shelf. If you added it from the right-click menu, make sure you selected 'Add > Reference Line...'.
- The chart looks cluttered: This is usually because there are too many bars or labels. Try reducing the number of dimensions in the view or adjusting the font sizes. You can also try hiding the grid lines or the axis labels.
- The target values are not updating: If you are using a calculated field for the target, make sure the calculated field is correct. You can test it by creating a new worksheet and dragging it into the view. If the calculated field is correct, the target values should update.
- The colors are not correct: This is usually because the formatting was not applied correctly. Make sure you right-clicked on the correct bar (the actual or reference bar) and selected 'Edit Formatting...'.
Frequently Asked Questions
Can I create a horizontal bullet chart?
Yes, you can create a horizontal bullet chart. The steps are nearly identical. In Step 3, instead of dragging the measure to the Rows shelf, drag it to the Columns shelf. In Step 4, drag the target calculated field to the Rows shelf, and in Step 5, drag the small circle with the plus sign (+) from the target bar to the Columns shelf.
How do I add a third dimension, like profit, to the chart?
You can add a third dimension by creating a dual-axis chart again. For example, you could create a dual-axis chart for 'Actual Sales' and 'Target Sales', and then create another dual-axis chart for 'Actual Profit' and 'Target Profit'. This will create a complex chart with multiple overlapping bars. It is often better to create separate worksheets for each dimension and use dashboards to combine them.
Can I use a calculated field for the reference line?
Yes, you can use a calculated field for the reference line. When you are adding the reference line, choose the 'Field' option from the 'Value' dropdown menu. Then, select the calculated field you created for the target. This will allow you to create a reference line for each dimension in the view.
How do I make the bullet chart interactive?
You can make the bullet chart interactive by adding filters. For example, you could filter by 'Region' to show the actual and target sales for a specific region. You can also add a parameter to control the target value. This would allow you to change the target and see how the actual values compare.
Can I use a bullet chart to compare multiple time periods?
Yes, you can use a bullet chart to compare multiple time periods. For example, you could create a bullet chart that shows the actual sales for the current month and the target sales for the current month. You could also create a bullet chart that shows the actual sales for the current month and the target sales for the previous month. This would allow you to compare the current performance against the previous performance.
Is there a built-in bullet chart template?
No, Tableau does not have a built-in bullet chart template. You have to build it from scratch using the steps outlined above. However, you can save the chart as a template or a dashboard template to reuse it for future worksheets.