Edit – This post describes one approach. But, it turns out, there is an easier way: Dynamic Annotations (Part 3)
Part 1 described how to implement dynamic annotations in Tableau using a copy of a measure as a dual axis. However, there were some limitations to that approach. The biggest limitation is that you won’t be able to use the dual axis for anything else.
Here is a dashboard with a dual axis combo chart view that makes use of dynamic annotations.
This solution is very similar to the one proposed in Part 1. However, instead of using a dual axis, I’m using the Measure Names / Measure Values. With this approach, I can have as many copies of the measure for the marks I want to annotate as I want. In that way, I can have multiple “sets” of annotations.
Here are the steps:
|Sales (Annotation Set 1)||IF [Annotation] = 1 THEN [Sales] END|
|Sales (Annotation Set 2)||IF [Annotation] = 2 THEN [Sales] END|
|Sales (Annotation Set 3)||IF [Annotation] = 3 THEN [Sales] END|
|Sales (Annotation Set 4)||IF [Annotation] = 4 THEN [Sales] END|
That’s it! You now have annotations that dynamically change based on end-user interaction!