A new way for displaying KPIs next to Bars in Tableau – Skill Pill Video

kpis next to bars tableau btprovider

Who doesn’t have KPIs for their business? Is there anyone who doesn’t look at his KPIs on a daily basis? I do not think it’s possible. KPIs are most likely among the first things that come to mind when we think about data analysis. And that’s just because, in one form or another, there is no activity within an organization that does not require tracking KPIs and targets. In today’s post we will discuss how to display KPIs next to bars in Tableau Desktop.

Today’s post will show you more than just a technique of displaying KPIs in Tableau. Thus, we will discuss how to track a certain KPI, referring to several dimensions and a target. We have discussed many times in our posts about different methods of displaying and tracking KPIs in Tableau. You can see more about Bullet Graph in which we talked about how to track progress to a certain target, referring to current and past values. You can also use a Podium Chart or Sparklines. I encourage you to access our blog section where you will find more tips and tricks regarding viewing KPIs in Tableau.

How to display KPIs Next to bars in Tableau

The visualization we are going to build below may certainly seem common to you. A bar chart in Tableau is most likely one of the most used. But we will try to improve this chart and add a few other elements, so that in the end the visualization will give us the information we need. First, we will start to create a bar chart and add a reference line that represents our target. This reference line is given by a calculated field.

Next, we will choose to display KPIs through an image, not through the values they represent. We all know that many times an image can say 1000 words and that is why Tableau views made with photos or icons offer an interactive design and are easier to navigate. Displaying KPIs in this visualization will be done right next to bars in order to identify and corelate the information we are interested in.

In the video below and in the following lines you will find all the steps you need to go through to apply this method and display KPIs in a bar chart.

Step 1: Connect to data

→ In Tableau Desktop, connect to Tableau: Sample Superstore

Step 2: Create the visualization

→ Select Analysis > Create Calculated Field: Latest Year
IF {MAX(YEAR([Order Date]))}=YEAR([Order Date])
THEN [Sales]
END

→ Select Analysis > Create Calculated Field: Prior Year
IF {MAX(YEAR([Order Date]))}-1=YEAR([Order Date])
THEN [Sales]
END

→ Drag Latest Year on Columns

→ Drag Prior Year on Details

→ Din Analytics, drag Reference Line on Cell, from Values, select sum(Prior Year)

→ Select Analysis > Create Calculated Field: Alert Position
-WINDOW_MAX(
if [YoY] THEN sum([Latest Year])
ELSE sum([Prior Year]) END)*0.05

→ Drag Alert Position on Columns, select Compute Using: Table (Down)

→ Select Dual Axis and Synchronize Axis

→ From Marks, select Bar for Latest Year and Shape for Alert Position

By Eduard Arhire

Download Tableau Software