Almost certainly during the course of work with Tableau one will encounter the issue of trying to implement a tooltip and at the same time using a dashboard action or a quick filter that shall also filter the tooltip.
Starting with the action filters
Unfortunately, we cannot pass through the action as a filter to the tooltip.
If you want to follow along, grab your Tableau and connect to sample superstore.
Create three simple sheets:
- Selection sheet –> just put customer names on rows
- Line chart –> Month([Order Date]) continuous goes on columns and sum([Sales]) on the rows
- tooltip -> put category on rows and sales on text marks
With that, your tooltip will show the well known 2.297 Mio USD in sales.
In sheet 2 insert sheet 3 in your tooltip.
Put sheet 1 and sheet 2 on a dashboard.
Configure a filter action:
Your intention is that your user can select a customer name from the selection sheet, the graph will adjust to this customer and the tooltip will show this specific customer’s monthly sales by category.
Like this (I know, this is looking awesome, isn’t it?)
Things you will notice:
- Selection sheet is not configured as a quick filter but we use the action
- The line graph updates as intended
- The sheet included in the tooltip absolutely does not match the customer’s monthly sales
Now have a look at the tooltip sheet. We can see that only the month is conveyed as a filter to it:
So that explains. But how can we overcome it? We want the user to only see the selected customer’s sales per month
Hint: putting the action to details on our line chart or whatever may seem feasible does not help our cause here but feel free to try.
Option 1 is to put your tooltip sheets also on the dashboard and make them basically invisible: reduce size to 1px or alternatively put them into a container, use the “show/hide” button option, hide them and remove the button. The sheet will still count as being on the dashboard but not visible nor selectable by the user. You can then attribute your filter action directly to the tooltip.
The second option is to simply put the field by which you filter also onto the details of your sheet that harbours the tooltip.
So in our example this would be “customer name” that goes to the details of our line chart. Now suddenly the action filter in the tooltip sheet will look like this:
Downside to this one: the moment you de-select the filter action and everything becomes visible we would have a multitude of lines on our chart, one per customer which is not what we want. Therefore, Option 2 is maybe more elegant but only really viable in cases where only one customer is selected at any given point in time.
One more option when using quick filters
When using customer names not as a means for an action filter but simply use the field as a quick filter (that is: putting the field on the filter shelf) we have one more option at hand:
Making use of the “All using this data source” filter option will allow us to also filter the tooltip provided it is using the same (or, using the “relation data sources” option) or a related data source.
Downside to this in my opinion: Personally I do not really like this “all using this data source” option as I do not like all sheets being filtered automatically. If this is ok for you, there you have an extra option.
Selected worksheets will only be usable in case you make use of the outlined option one for filter actions, otherwise you cannot select the tooltip sheet.
That’s it for today.
Have a great day and as always appreciate your feedback.
Until next time