QueenOfData

Single-axis lollipop charts in Tableau

Single-axis lollipop charts in Tableau

You want to create a lollipop chart in Tableau but for whatever reason can only use one axis to do it? Let me show you how.

What you do

Start by creating your run-of-the-mill bar chart. Let’s assume you want horizontal lollipops, so you’ll drag your dimension onto Rows and your measure onto Columns. Now double-click in the empty space in Columns and type in MIN(-1000). If you have very high values, you might want to add a few zeroes here. Press Enter and drag the resulting green pill onto the axis of your first measure.

Tableau will automatically put Measure Names onto Rows and will put your two measures (the original one and the ad-hoc calculation) into the resulting Measure Values box. Change your Marks type into Lines, and drag Measure Names away from Rows and onto Path. Click on Colour and select the second icon after Marks. This will make Tableau show every data point as a small circle. Can you see where I’m going with this yet?

Now edit your axis to have a fixed start, but leave the end on automatic so that the axis will adapt if your values change. Change the Size to whatever size you like. Voilà, you have just created a lollipop chart with just one axis.

Adapting as needed

If you want a vertical lollipop chart, you have two options. One, you could exchange Rows and Columns with one another in the above text. Two, you follow these instructions as-is and then swap Rows and Columns via button click or by pressing CTRL+W at the end. If you have only negative values, change your ad-hoc calculation to MIN(1000) and edit your axis to have a fixed end, but leave the start on automatic.

Limitations

This will only work if you are not using Measure Names / Measure Values anywhere else in the same sheet. Additionally, all aggregated values need to have the same sign (i.e., only positive values or only negative values).


Find more tips like these in my Tableau Tip Battle with Annabelle Rincon at the Tableau Fringe Festival of December 2020: