Its been a while when Tableau introduced Viz in Tooltips in the year 2018. Since then I have seen many innovative ways this functionality is used. It has opened a new way of drilling down into information without clicking any data point. You can embed an entire sheet within the tooltip.

As real estate is really important when you are building a dashboard, "viz in tooltip" functionality has enabled users to build different charts on top of dashboards, so that users can drill down into more information instead of filtering or navigating to other views. The point to note here is this visualization works only at one level on top of another. You can not interact with the visualization available in the tooltip.

Let's take a look at a very basic view and how we can create a viz in the tooltip.
I have used the Superstore data set which comes with Tableau Desktop. I created a map that shows the profit for each of the states in the US. Tableau by default shows primary dimension & measure in the tooltip.


Now looking at this chart I want to know who are my top 5 customers for this we will create another sheet. I created a set for the top 5 customers in the state and added it in the filters with only
In values selected.


Now you need to add this sheet in the tooltip of the Map. You need to open the tooltip window and insert the sheet using the top right dropdown.


Now when you see the tooltip, you see the top 5 customers in the state but it is not there in all the states, because your tooltip filter is bringing in the top 5 customers from overall profit across America. If a customer (out of the top 5) has ordered in California but in Arizona, that customer name will not show up in California. This is when Context filters come to the rescue.


To show the top 5 customers from each state in the tooltip, you need to first filter the state in the top 5 sheets and then filter on set, for that add the tooltip action filter on the Top 5 sheet to context. This will resolve the issue and you will see the top 5 customers for each state. 


Similarly, I create another sheet with a bullet graph where I have 2020 sales vs 2019 sales for the top 5 cities. I followed similar steps to create the set with the top 5 cities by sales and add it to the tooltip after which, it looks something like this.


You can customize the viz as per your requirement. You can change the width and height of your sheet in the tooltip, which is by default fixed to 300 pixels. Tableau sets the filter of the sheet to All Filters in the tooltip.

<Sheet name="Top Customers by Qty" maxwidth="300" maxheight="300" filter="<All Fields>">

You can change the filters on your own by using different dimensions and changing the filter names in the tooltip. For Example, your code might look like this after changing the filters on your inserted sheet code.

<Sheet name="Top Customers by Qty" maxwidth="500" maxheight="300" filter="<State>">

You can also filter on date level as below:

<Sheet name="Top Customers by Qty" maxwidth="500" maxheight="300" filter="<Month(Order Date)>">

This is what we get after adding Viz with filters in the tooltip of the map. Access this dashboard here.

Few Important pointers that you need to keep in mind while adding Viz in Tooltip:
1. You cannot interact with the sheet in the tooltip while on the dashboard.
2. While using multiple data sources, you can use only <All Fields> filter, and tableau will detect common field names and will apply the filters automatically.
3. One sheet can be used only once in the tooltip. You cannot reuse a sheet for another tooltip viz.

I try to use this functionality mostly to add further context to the data that I show on my Visualization. Like I did in this, where I use tooltip viz to show Net revenue with bullet graph and Top 5 products by New revenue for the highlighted country.


The most recent and great example of viz in tooltip I saw is one developed by George Gorczynski. His viz was also
selected as VOTD by Tableau.


Post a Comment

Previous Post Next Post