How to Add Tooltip Filter in Tableau
Adding a detailed chart inside a tooltip is one of the most effective ways to add context to a Tableau dashboard without taking up valuable screen space. This feature, known as "Viz in Tooltip," lets you create powerful, interactive filters that reveal deeper insights on demand. This article provides a step-by-step guide on how to add a tooltip filter in Tableau to make your dashboards more dynamic and user-friendly.
What Exactly is a Tooltip Filter in Tableau?
In Tableau, a "Viz in Tooltip" allows you to embed one visualization (a "target sheet") inside the tooltip of another visualization (a "source sheet"). When a user hovers their mouse over a mark on the source sheet - like a state on a map or a bar in a chart - the target sheet appears within the tooltip, automatically filtered to the specific data point they are hovering over.
For example, imagine a map of the United States showing total sales by state. With a tooltip filter, you could hover over California and instantly see a line chart in the tooltip displaying California's sales trend over the past four years. Hover over Texas, and the line chart automatically updates to show the sales trend for Texas.
This functionality is more than just a cool trick, it’s a powerful tool for designing clean and insightful dashboards. Here’s why it’s so useful:
- Saves Dashboard Space: You can provide detailed, granular data without adding more charts to an already crowded dashboard.
- Provides Context Instantly: Users get immediate context for a data point without having to navigate to another dashboard or apply a separate filter.
- Creates an Interactive Experience: It encourages users to explore the data by simply moving their mouse, making a static dashboard feel more like a dynamic application.
Preparing Your Tableau Worksheets for a Tooltip Filter
Before you can create the tooltip filter, you need to build at least two separate worksheets in your Tableau workbook. For this tutorial, we will use the "Sample - Superstore" dataset that comes packaged with Tableau.
Our goal is to create a map where hovering over a state shows a line chart of that state's sales over time.
1. Create the Source Sheet (The Map)
The "source" sheet is the main visualization that the user will interact with. This is where the tooltips will appear.
- Open a new worksheet and name it something clear, like "Sales Map".
- Double-click the State field in the Data pane under Location. Tableau will automatically generate a map of the United States.
- Drag the Sales measure onto the Color card in the Marks pane. This will color each state based on its total sales volume.
- Your source sheet is now ready. It should be a map showing sales by state.
Example: You should see a map where states like California and New York are a darker shade of blue (higher sales) and states like North Dakota are a lighter shade (lower sales).
2. Create the Target Sheet (The Viz for the Tooltip)
The "target" sheet is the visualization that will be displayed inside the tooltip. This visualization needs to contain the dimension you want to filter by - in this case, State.
- Create a second new worksheet and name it something like "Sales Trend".
- Drag the Order Date field to the Columns shelf. Right-click it and change the date level to a continuous Month.
- Drag the Sales measure to the Rows shelf. You should now see a single line chart showing total company sales across all months.
- Here's the most critical step for making the filter work: drag the State dimension onto the Detail card in the Marks pane. This step doesn’t visually change your line chart yet, but it tells Tableau that the "Sales Trend" sheet contains state-level data. This enables Tableau to filter the line chart based on the state selected in the "Sales Map" sheet.
Now that both the source sheet ("Sales Map") and target sheet ("Sales Trend") are created, you're ready to connect them.
Step-by-Step Guide: How to Add the Tooltip Filter
With your two worksheets prepared, connecting them is a straightforward process. This all happens within the tooltip editor of your source sheet.
1. Navigate Back to Your Source Sheet
Go back to the "Sales Map" worksheet. This is where you will add the "Sales Trend" chart into the tooltip.
2. Open the Tooltip Editor
In the Marks pane, click on the card labeled "Tooltip". This will open up a text editor window where you can customize what appears when you hover over a mark on the map.
By default, the editor will show the fields already on your visualization, like State and SUM(Sales).
3. Insert the Target Sheet into the Tooltip
In the top-right corner of the Tooltip editor, click the Insert button. You will see a dropdown menu. Select Sheets, and then choose your target sheet, "Sales Trend".
Tableau will automatically insert a piece of code into the editor that looks like this:
< <,Sheet name="Sales Trend" maxwidth="300" maxheight="300" filter="<,All Fields>,">, >
This short line of code is what makes the magic happen. Here’s a quick breakdown:
- name="Sales Trend": This specifies which worksheet to embed.
- maxwidth="300" and maxheight="300": These control the size of the embedded visualization in pixels. You can change these numbers to make your viz larger or smaller.
- filter="<,All Fields>,": This is the most important part. It instructs Tableau to filter the target sheet ("Sales Trend") using all of the fields and dimensions that exist on the source sheet mark you’re hovering over. In our example, when you hover over Colorado on the map, Tableau filters the "Sales Trend" viz to show data only for "State = Colorado".
4. Tidy Up and Test the Tooltip
You can add explanatory text or headers to your tooltip to make it even clearer. For example, you can add "Trend" so your tooltip editor has "State: <,State>,", "Sales: <,SUM(Sales)>,", "Trend:", followed by the sheet insert code.
Click OK to close the editor. Now, go to your map and hover over any state. You should see a pop-up including the state name, total sales, and a fully rendered line chart showing the sales trend for that specific state. Hover to another state, and the line chart will update in real-time. Congratulations, you've just created an interactive tooltip filter!
Best Practices and Pro Tips for Tooltip Filters
Creating a Viz in Tooltip is easy, but making it effective requires some thought. Here are a few tips to ensure your tooltip filters are user-friendly and performant.
Keep the Tooltip Viz Simple
The tooltip is a small space. A complex chart with dozens of marks, labels, and colors will be unreadable and can slow down rendering. Simple visualizations work best:
- Line Charts: Perfect for showing trends over time.
- Simple Bar Charts: Great for comparing values across a few categories.
- Big Numbers (Text Tables): Use a single large number (like KPI highlight tables or BANs) to call out an important metric like growth percent or average order value.
Hide Unnecessary Elements on the Target Sheet
Your target sheet probably has titles, axes, and headers that you don't need to show inside the small tooltip window. Go to your target sheet worksheet (e.g., "Sales Trend") and:
- Right-click on the chart title and select "Hide Title".
- Right-click on the axes and uncheck "Show Header".
This cleaning step makes the embedded viz look much cleaner and puts the focus directly on the data.
Filter by Specific Fields for More Control
While filter="<,All Fields>," works great most of the time, you can also filter by specific fields. This is useful when you only want certain dimensions to apply. To do this, you would replace "<,All Fields>," with the field name, like this:
< <,Sheet name="Sales Trend" maxwidth="300" maxheight="300" filter="<,State>,">, >
Be Mindful of Performance
Every time you hover over a mark, Tableau has to run a query to render the tooltip visualization. If your target sheet is very complex or your dataset is massive, tooltips might feel slow or laggy. If you notice a delay, try simplifying the target sheet or adding filters to reduce the amount of data it needs to process.
Common Troubleshooting Scenarios
- "My tooltip chart isn't filtering!" - The most common reason for this is that the filtering dimension is not included on the target sheet. In our example, if you forgot to drag State to the Detail card on the "Sales Trend" sheet, the tooltip would just show the overall company-wide trend for every state. Always double-check that the filtering dimension is present on both sheets.
- "My tooltip looks squeezed or cropped" - Go back to the tooltip editor on the source sheet and adjust the maxwidth and maxheight values until it looks right.
Final Thoughts
Tooltip filters are a powerful and elegant way to add more depth to your Tableau dashboards. By embedding one worksheet into the tooltip of another, you can provide users with rich, contextual information exactly when and where they need it, all without cluttering your main view. This feature helps transform a standard dashboard into an interactive and intuitive analytical tool.
The goal is always to make data exploration simpler and more intuitive. At Graphed, we're focused on that same goal. While building sophisticated tooltips in Tableau is a great way to streamline a dashboard, we built our platform to eliminate the manual setup process entirely. By connecting your data sources and simply asking questions in plain English, you can generate real-time dashboards and reports in seconds, letting you and your team get to the insights even faster.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?