Dynamic Tooltips that Keep Up with Dashboard Interactivity

I’ve recently been deep-diving into a personal HR analytics project using a "Real World Fake Data" set.  My goal was simple: practice my dashboarding skills and understand how to extract meaningful DE&I insights.

I built three primary charts to work together:

  • An Ethnicity Bar Chart (the main engine for insights).
  • A Gender Donut Chart (the first level of filtering).
  • An Attrition by Department Chart (the second level of filtering).

The Challenge: When Interactivity Breaks the Math

The complexity wasn't just making the charts talk to each other, it was making the labels and tooltips smart enough to keep up.  I wanted them to adjust instantly to reflect whichever specific population was selected, without the numbers "breaking" or showing the wrong context.

The "Label" Hurdle: Down vs. Across

I used proportional brushing on the ethnicity bars.  If you click "Female" on the donut chart, the ethnicity bars highlight the proportion of women within each ethnic group.

This created a logic puzzle for the labels:

  1. No filter? Show a Table Down calculation (Ethnic makeup of the whole company).
  2. Gender selected? Show a Table Across calculation (The gender split within that specific ethnicity).

To solve this, I had to create "Dual Labels", two separate calculations sitting on the label mark that "hand off" to each other depending on the view.

The image displays a snippet of a spreadsheet or data table, featuring a conditional formula that calculates the proportion of active IDs by gender, with the condition that it only shows the race distribution for unselected genders in the company or department.

AI-generated content may be incorrect.
The image depicts a code snippet with a conditional statement calculating the ratio of active IDs by gender, including a dependency check and an OK button.

AI-generated content may be incorrect.
The image shows a user interface with a tableau regular label setting, featuring options to edit, insert, and apply labels, including gender and race split labels, with additional buttons to preview or cancel changes.

AI-generated content may be incorrect.

The Tooltip "Brain": 11 Calculations for 1 Experience

With three charts interacting, the data gets dense.  I wanted to show how a department's diversity compares to the company average, but I didn't want to clutter the UI.  The tooltip was the only way to go.

Almost every word in my tooltips is a calculation.  I needed 11 separate calculations just to handle the "State Logic."  The tooltip has to ask itself three questions before it speaks:

  1. Am I looking at the whole company?
  2. Am I looking at a specific gender, but the whole company?
  3. Am I looking at a specific gender within a specific department?

If the state is true, show the value.  If not, disappear.  Even the word "Department" only appears if you’ve actually filtered by one!

The image depicts a configuration for a table calculation in a software interface, specifically showing an intersectional state calculation for gender selection, counting departments, and confirming the validity of the calculation.

AI-generated content may be incorrect.
The image shows a user interface with an interface tool that calculates the composition percentage of a department based on gender selection.

AI-generated content may be incorrect.
The image displays a snippet of code or pseudocode, specifically a conditional statement in a programming or configuration tool, outlining a decision structure for handling departmental data based on certain state conditions.

AI-generated content may be incorrect.
The image shows a tableau dashboard with various data fields and analytics tools, including gender, race, and ethnicity variances, composition, and intersectional metrics, along with options to show or hide tooltips and manage command buttons.

AI-generated content may be incorrect.

The Takeaway

In the two weeks I spent on this, I spent two full days just refining these labels and tooltips.  It might seem like overkill, but in analytics, context is everything.  Raw numbers are fine, but showing a manager exactly how their department’s gender divide compares to the company average, accurately and instantly, is where the real value lies.

Author:
Kib Cheung
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2026 The Information Lab