How to Create a Dynamic Tooltip to Display Different Values for Different Measures

Published: 13 Apr 2021
Last Modified Date: 19 Apr 2021


How to create a dynamic tooltip to display different values for different measures?

For example, when use [Measure Names] to display several values, how to show different tooltips base on the measure you selected.
User-added image




  • Tableau Desktop


Use Parameter Action could achieve this function. Below are sample steps:
1. Create a String Parameter like below
User-added image

2. Create a calculation field to show the SUM of measures.
IF [_Measure Names]="Sales" THEN { SUM([Sales])}
ELSEIF [_Measure Names]="Profit" THEN { SUM([Profit])}
ELSEIF [_Measure Names]="Quantity" THEN { SUM([Quantity])}

3. Create a Parameter to transfer the hovered measure names to Parameter
User-added image

4. Add the calculation to [Tooltip] and Edit the tooltip to show the dynamic SUM for different measures.
User-added image

Please check the attached workbook for details.

Did this article resolve the issue?