KNOWLEDGE BASE

Show Conditional Annotations with Filters


Published: 02 Dec 2022
Last Modified Date: 09 Dec 2022

Question

How to annotate the graph only when one special item is selected in the filter.
For example, if you select "Furniture" in the Category filter, it should show the annotation. and if you select other items in the filter, the annotation should be hidden.
User-added image

Environment

  • Tableau Desktop

Answer

Please follow the steps below. 

1. Create a calculation with IF to set the conditional annotation string.
IF [Category]="Furniture" THEN "Furniture Annotation"
END

2. Add the calculation created in Step 1 to [Details] like the below image.
User-added image

3. Add a Mark Type annotation and modify the contents in annotations like the image below.
User-added image

Please also check the attached workbook for details.

 
Did this article resolve the issue?