A lot of the dashboards I create today are Executive KPI Dashboards; this basically means KPIs and indicators. In this Tableau, Quick Tip, we are going to build a simple KPI Dashboard and use Unicode characters as the KPI Text Indicator.

## Data

We will start by loading the following data into Tableau Desktop / Tableau public.

Note: If you have Tableau Desktop, you can use the Sample data source, but if you are using Tableau Public, download and load the following data source.

## Calculated Fields

We only need a single Calculated Field for our Data Visualisation.

Sales (2017)

``IIF(YEAR([Order Date]) = 2017,[Sales],NULL)``

Sales (2018)

``IIF(YEAR([Order Date]) = 2018,[Sales],NULL)``

Sales Growth (2017 vs 2018)

``ZN((SUM([Sales (2018)])-SUM([Sales (2017)]))/SUM([Sales (2017)]))``

Note: Yes, for our example, we have hardcoded the years, but you can make this more dynamic.

Sales Growth (Negative)

``````IF [Sales Growth (2017 vs 2018)] < 0 THEN
STR(ROUND([Sales Growth (2017 vs 2018)]*100,1))+"% ⯆"
END``````

Note: we can use Unicode in our text, so do make full use of this.

Sales Growth (Positive)

``````IF [Sales Growth (2017 vs 2018)] > 0 THEN
STR(ROUND([Sales Growth (2017 vs 2018)]*100,1))+"% ⯅"
END``````

Sales Growth (No Change)

``````IF [Sales Growth (2017 vs 2018)] = 0 THEN
"0.0% ⯈"
END``````

With this done, let us start creating our data visualisation.

## Worksheet

We will now build our worksheet:

• Change the Mark Type to Text
• Drag State onto the Rows Shelf
• Drag the following onto the Text Mark:
• State
• Sales (2018)
• Sales Growth (2017 vs 2018)
• Sales Growth (Negative)
• Sales Growth (Positive)
• Sales Growth (No Change)

You should see the following:

Now we will edit text, click on the Text Mark and Change change the text to the following (including colours):

At any given time, only one of the growth rates will show, and with a little formatting, filtering, and adding versions of this sheet to a dashboard, you can end up with the following:

and boom, we are done… I hope you enjoyed this tutorial, and as always, you can find this data visualization on Tableau Public at https://public.tableau.com/profile/toan.hoang#!/vizhome/KPITextIndicator/KPIsTextIndicators

## Summary

I hope you all enjoyed this article as much as I enjoyed writing it and as always do share the love. Do let me know if you experienced any issues recreating this Visualization, and as always, please leave a comment below or reach out to me on Twitter @Tableau_Magic. Do also remember to tag me in your work if you use this tutorial.

If you like our work, do consider supporting us on Patreon, and for supporting us, we will give you early access to tutorials, exclusive videos, as well as access to current and future courses on Udemy: https://www.patreon.com/tableaumagic

Toan Hoang, Tableau Zen Master 2020, has over 15 years of experience in Business Intelligence, Data Management, Big Data, Data Lakes, Internet of Things (IoT), Data Visualisation and the Data Analytics space; the last six years has been dedicated to delivering end-to-end solutions using Tableau.

1. Hello Toan,
I am an avid fan and follower on YouTube, I want to say thank you for all you do and continue to do.

2. I’m getting error in the Sales(2017) and Sales(2018), and consequently on other dependable. It says calculation contains error, i.e ‘Year is being called with (string), did you mean (datetime)?’ Any fix for the same.

3. What is the formula for generalizing the difference for all the years? I did this

ZN((SUM([Sales])-Lookup(SUM([Sales]),-1))
/Lookup(SUM([Sales]),-1))

and none of my calculated filed appear in filter while selecting field for TOP N option .. What might be the problem ?

Thank you so much in advance

This site uses Akismet to reduce spam. Learn how your comment data is processed.