KNOWLEDGE BASE

Show Conditional Annotations with Filters


Published: 02 Dec 2022
Last Modified Date: 06 Sep 2023

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, the annotation should display.  If you select other items in the filter, the annotation should be hidden.
User-added image

Environment

  • Tableau Desktop

Answer

Please follow along with the sample packaged workbook found in the Attachments section to the right of this text.

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

2. Add the calculation created in Step 1 to Detail as demonstrated in the below image.
User-added image

3. Add a Mark type annotation and modify the contents in Annotations as shown below.
User-added image

 
Did this article resolve the issue?