Create Lollipop Chart in Tableau

As a business analyst at a retail company, I was working on analyzing the data of sales profit of different product sub-categories using Tableau. For this, I need to visualize the data in a way that shows the profit and ranking of products according to their sales profit.

To display the profit and profit rank for each category, I created a Lollipop chart in Tableau. With this chart, I was able to show the profit scale through the bar and a circle at the tip of each bar to display the rank of the product according to the profit it made.

In this Tableau tutorial, I will explain the Tableau Lollipop chart and how to create one to visualize the data in Tableau.

What is a Lollipop Chart in Tableau?

In Tableau, the Lollipop chart is a variation of a bar chart that has a dot or circle at the top of each bar to show comparisons and highlight specific values. The lollipop chart is useful in scenarios where we need to display rankings or trends, to show easy comparison of data, as an alternative to regular Tableau bar charts

Create a Lollipop Chart in Tableau

To create a Lollipop chart in Tableau, we will use the Superstore dataset from Tableau. Using the Lollipop chart, we will display the ranking of the product subcategories according to their sales profit.

Connect the Tableau with the Superstore data and follow the steps below to create a Tableau Lollipop chart.

  1. Add the Sub-categories to the Columns and Profit to the Rows.
  2. Duplicate the Profit on the Rows, for this press “Ctrl” and drag the Profit in Rows. Then click on the second Profit in Rows and select Dual Axis.
Cerate a Tableau Lollipop Chart
  1. Now, you will see that the mark type will be automatically set to circle chart for both mark types. Here, change the Marks type to the Bar for the Profit(1).
Tableau Lollipop Chart

Check out:  Map Chart in Tableau

  1. To show the proper lollipop chart, we need to adjust the size of bars and circles. In the Size card of the Marks section, adjust the slider to make the circles visible on the bars.

Ideally, reduce the size of bars and increase the size of circles.

Lollipop Chart in Tableau
  1. Still, the circles won’t be stacked accurately on the bars to show a Lollipop bar. To adjust this, right-click on the Y-axis and select Synchronize axis.

With this, the chart will display the circles at the tip of bars showing the proper shape of a lollipop.

Create a custom Lollipop Chart in Tableau
  1. To change the colors of bars, click on the color card in the marks section of Profit(1) and select a color.

We can also use a measure to show color, like Sales, where it will show higher sales with a darker color contrast in the bars and lower sales with the lighter shades.

Tableau Lollipop bar chart

Check out: Tableau Bubble Chart

  1. For the color in the circles of the lollipop chart, I have added the Profit measure to the Color of the Profit(2) marks.

For this, I have selected the shades of Red to Green from the color palette and selected the Red-Green Diverging color.

In this chart, we will display profit in green and loss in red. For this, select the Pallete Red-Green diverging. Then, set Start range as -1 and End range as 1.

This will show profit value above zero as green and below it as red.

Customize Tableau Lollipop Chart
  1. To display the ranking numbers of the products according to their profits, create a calculated field using the formula below. Label the calculated field as Profit Rank.
RANK(SUM([Profit]), 'desc')
  1. Add the calculated field to the Label card in the Marks of Profit(2). This will display the ranks of products’ profit rank numbers below the circle.
Add ranks in Tableau Lollipop Chart

Check out:  Radar Chart in Tableau

  1. To display the ranking inside the circle, click on the Label card and select Alignment > Vertical > Middle.
Create a Tableau Lollipop Chart

At last, remove the Y-axis header. To do this, right-click on the axis and uncheck Show header.

With this, the Lollipop chart is complete, through which we can see the Profit and profit ranking for each product sub-category.

How to Create lollipop chart in tableau

This way, we can create a Lollipop chart in Tableau by using the bar and circle charts and merge them to display a Tableau Lollipop chart.

I hope this tutorial helped you clearly understand what a Tableau Lollipop chart is and how to create one by following the above steps. You can use it to visualize the data where you want to see profits, rankings, or trends with bars and circles of the Tableau Lollipop chart.

You may like to read:


Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.