Alternative Bullet Graph Design in Tableau

How to realize an alternative Design of Bullet Graphs in Tableau

Alternative Bullet Graph TableauThe recent posts suggested an Alternative Design of Bullet Graphs and an interactive version of a Bullet Graph. Both articles provided example workbooks in Microsoft Excel.

These posts included three variations of the well known standard design of Bullet Graphs described in Stephen Few’s design specifications: no qualitative background areas (e.g. poor, satisfactory, good), data labels for actual and target as well as the visualization of the gap (target minus actual) with a data label and a span line to put the gap label into context, i.e. a thin line between actual bar and target line with arrows at the beginning and the end.

How would this alternative design of a Bullet Graph look like in Tableau?

Well, truth be told, I never managed to create an exact replica of my Excel implementation in Tableau. The Excel version is using error bars to display the span line of the gap. A comparable feature is not available in Tableau, but you can still realize the alternative design of Bullet Graphs in Tableau coming close to the Excel implementation.

Today’s post presents a short description of how to realize my alternative design of Bullet Graphs on Tableau Public including the option to download the Tableau workbooks.

Alternative Bullet Graph without Gap

Omitting the qualitative ranges and displaying the data labels is a walk in the park: if you are using the Bullet Graph in Tableau from Show Me to create the view, simply remove the reference line [60%, 80% of Average Value]. Next, add mark labels to the actuals (Analysis|Show Mark Labels) and to the target line (Edit Reference Line and set Label to Value). The Bullet Graph then looks like this:

Alternative Bullet Graphs in Tableau 1 - click to enlargeThe challenge of the alternative Bullet Graph design in Tableau is visualizing the gap between actuals and targets. As mentioned in the introduction, working with an error bar is not an option. So, here are the two possible solutions I can think of:

Alternative Bullet Graph with Gap Version 1 – Stacked Bar Chart

First of all, you need a Calculated Field for the gap value:

IF [Target] > [Value] THEN
[Target]-[Value]
ELSE
Null
END

Not much to explain here, I guess. The gap is the difference between [Target] and [Value], if target exceeds value and Null otherwise.

Next, you put Measure Values to the Columns Shelf and Measure Names to the Filters Shelf and select [Value] and [Gap] in the Filter dialogue. Drag Measure Names to the Colors Card of the Marks Shelf and format the bars as you like, e.g. the value with a dark grey and the gap with a light grey:

Alternative Bullet Graphs in Tableau 2 - click to enlargeAlternative Bullet Graph with Gap Version 2 – Gantt Bar

The second approach tries to get closer to the span line between value and target by using a Gantt Bar as the Marks type for the gap. Here are the steps:

  1. Create a Calculated Field called [Gap Start]:
    IF [Target] > [Value] THEN
    [Value]
    ELSE
    Null
    END
  2. Drag [Gap Start] to the Columns Shelf, put it on the Dual Axis and synchronize the axes
  3. Set the Marks type of [Value] to a Bar Chart (instead of Automatic)
  4. Set the Marks type of [Gap Start] to a Gantt Bar
  5. Drag [Gap] to the Size Card of the Marks Shelf
  6. Reduce the size of the Gantt Bar to get to a thin line
  7. Drag [Gap] to the Label Card of the Marks Shelf
  8. Format the view as you like (colors, number formats, etc.)

Finally,the Tableau worksheet looks like this:

You can switch between the three versions described above using the story points at the top and download the workbook by clicking on the download button at bottom right.

Final Remark

Truth be told, I like the appearance of the Excel implementation better than the Tableau approaches described above. In my humble opinion, the thin span line with the arrows at start and end of the line is the perfect way to put the data label of the gap into context: it is intuitive and optimizes the data/ink ratio. However, I can’t think of a way how to do this in Tableau. This doesn’t mean it is impossible, it is just above my head. If you have an idea of how to improve the Tableau approaches shown above, please drop me a comment.

Stay tuned.

Comments

11 responses to “Alternative Bullet Graph Design in Tableau”

  1. David Catley Avatar
    David Catley

    I got a little closer to the original spec in Tableau: http://imgur.com/a/SG1uk but it does require a few workarounds that aren’t ideal.

  2. Robert Avatar

    David,
    many thanks for your comment and contribution.
    Very interesting! This looks great. I assume you worked with additional Calculated Fields and Custom Shapes?
    Would you mind sharing your workbook, e.g. on Tableau Public? This would be greatly appreciated.

  3. David Catley Avatar
    David Catley

    No custom shapes, but it is a ‘dashboard’ with a couple of elements rather than a single sheet, so that means you might have to be a bit more creative where you could use it. It also doesn’t behave quite right when you go ‘over’ target.
    It’s working with proprietary data at the mo, but i could re-do in tableau public over the weekend if it’d be helpful.

  4. Robert Avatar

    David,
    many thanks for your speedy reply.
    I can only speak for myself and I do neither know if many Tableau users are still reading my blog nor if people really like the bullet graph variations I suggested.
    In any case, I would definitely be very interested in seeing how you solve the challenge, even if it is (as you said) not ideal. If it isn’t too much effort, I would greatly appreciate if you could share a sanitized version. Thank you.

  5. Michael Martin Avatar

    Thanks, Robert for your great post!

  6. Robert Avatar

    David,
    first of all, thank you very much for sharing your work. Much appreciated.
    I now had a closer look at your workbook. So, you are using 2 annotations with no line, no fill and an arrow as the line end to visualize the span line and an additional sheet to show the data label above the target on a worksheet. Interesting ideas. It looks great in the view you posted and it is definitely closer to the Excel version than the Tableau approaches I posted.
    I see two disadvantages, though:
    1. It takes quite some extra effort to insert, position and format the annotations and to set up and align the views on the dashboard.
    2. Second disadvantage – and this is the major drawback in my humble opinion – the solution is static and the annotations have to be manually adjusted when the data (actuals and/or targets) changes or if a filter is used and another category or month is selected.
    So, it looks great and is closer to what I had in mind, but it is static and therefore probably not applicable to most dynamic business dashboards like monthly reports or analytical dashboards with filters.
    But you already knew all that, because you said it wouldn’t be ideal…
    Anyway, many thanks again for your ideas and contributions!

  7. David Catley Avatar
    David Catley

    Yep, although the arrowheads should be tied, on the left side to the end of the large bar, and the right had side to the far end of gannt bar that extends to the target value, so they should stay put as the values change, and its definitely a little fiddly to put together – the bigger problem is that annotation that should stay put over the middle of the bar, and making sure the vertical line stays in the same place to line up with the little ‘target’ box – I shall keep plugging away at it!

  8. Aprendendo excel Avatar

    I loved the post, I hope to see more content like this, I loved your tips thanks

  9. Ulrik Avatar
    Ulrik

    Great work Robert! I also miss the options provided by the Excel error bars.
    An alternative way of showing the gap information could be by means of adding arrow symbols to the label. Nowhere as elegant as the Excel solution but it would give a nice and discrete indication of the gap.
    Example based on your workbook: http://tabsoft.co/2xR9BhT
    Guess the only way to do thinner gap lines in Tableau would require some kind of scatter plot, but that would come with a lot of other costs. So probably not worth the effort…

  10. Robert Avatar

    Ulrik,
    many thanks for your comment.
    Great idea. As you said, not as elegant as the Excel solution, but I definitely like your version better than my two approaches.
    In case you haven’t seen it already: I recommend to have a look at Dave Cately’s solution provided in a comment above. Dave’s approach isn’t easy to implement and has a few drawbacks, but it is very close to the Excel version.
    Many thanks again to Dave and you for sharing your great alternatives.

Leave a Reply

Your email address will not be published. Required fields are marked *