Dynamic Annotations (Part 3)

Often, there is no “right” way to accomplish something in Tableau. There are often many ways to approach a solution.  Sometimes there are “better” ways.

I’ve been thinking for a while about a couple of my earliest posts (Dynamic Annotations part 1 and part 2).  It occurred to me that I had very much over-complicated the solution.  The more I understand how Tableau works, the simpler some things become.  It can be fun to struggle and come up with unique and creative solutions but it can be equally satisfying to understand why things work and have clarity on how to achieve certain results.

Dynamic Annotations is one such case.  Here is the easy way:

 

I had previously realized that a mark annotation was associated with a mark and would only show if the mark was shown.  My solution to turn annotations on or off was to show or hide certain marks using various calculated measures and dual axes.  Whoa!  Way too complicated…

What defines a mark?  When you see a bar or a circle or shape in Tableau or when you see the text “17 marks” in the lower left status bar, what is it that define those marks?

Tableau draws a mark for every intersection (tuple) of dimension values.

17 Marks based on combinations present in the data.

17 Marks based on combinations present in the data.

 

Various other factors can come into play.

Data densification can complete domains of dimensions and cause more marks to be drawn:

51 Marks based on  intersection of completed domains of dimension values

51 Marks based on intersection of completed domains of dimension values

 

Multiple axes can duplicate marks (once for each axis):

34 Marks based on intersection of existing values, (17 marks per axis)

Mark annotations are applied on a mark.  But what defines whether a specific mark annotation is shown is not just the intersection of dimension values.  There are two major factors:

  • The placement and order of any fields on the Rows or Columns shelf (the fields that define the X and Y position of the mark)
  • Any field used as a dimension on the Marks card or Pages shelf (fields that add additional values to the dimensional intersection / tuple).

The distinct combination of values for those fields defines a unique mark annotation which will only be shown for that specific set of values.

All of that may seem rather complex — but it leads to a very easy way to create dynamic annotations in Tableau.  You can have sets of annotations controlled by parameters or include fields as dimensions on the marks card that will change values based on action filters in a dashboard.  The possibilities are endless for dynamically controlling which annotations are shown.

Here’s how I created the sets of annotations shown above:  First, I created a parameter that allows the user to decide which set of annotations to see.  You’ll notice I used a list of integers with “Display As” text.

Parameter with 4 options

Parameter with 4 options

Then, I created a calculated field that simply returns the selected value of the parameter.

Calculated field that returns selected value of parameter

Calculated field that returns selected value of parameter

Then, I just placed that calculated field on the Marks card as a dimension (remember, that is one of the key factors).  Then, as I cycle through the parameter options I can annotate marks with whatever annotations I want to have displayed for that particular selection of the parameter.

Final

 

Wow!  That was far easier.

Honored and Humbled – Becoming a Tableau Zen Master

First, I need to say I have the best co-workers.  They are colleagues and friends.  This was on my desk when I returned to work after conference:

Zen Garden

If you’re looking for a place to grow, learn, teach, and serve others — you can’t do better than Teknion Data Solutions.  Thank you to everyone there for all the support and opportunities!

When you listen to the response of newly inducted Zen Masters two words stand out: “honored” and “humbled.”

“Honored” makes sense when you first hear it.  It is indeed a high honor to be named Zen Master by Tableau.

But what about “humbled”?  Why is that the other term that Zen Masters are likely to use to describe themselves?  I’ll speak for myself.  Here are some reasons I feel humbled:

  • I’ve been named among many who I consider to be my mentors.
  • I work with and meet many people who teach me new things every day.
  • I stand on the shoulders of giants.  What I know is made up of what I’ve learned from others.
  • There’s a lot I still don’t know.  Zen Master doesn’t mean “mastery” in the sense that I know everything.  Far from it.  I’m still learning how much I don’t know.
  • There’s a lot I will never know.  And that’s okay.  I once naively thought that one really could know all there was to know about Tableau.  But even if you could master every last menu option consider all the areas Tableau touches: databases, data structure, analysis, statistics, R, GIS, writing code, visualization, design, server administration, and more!  Who can master it all?  No one.  Should we despair? No!  First, Tableau is so incredibly intuitive that anyone can start using it to create beautiful and useful things without a steep learning curve.  Second, I am incredibly grateful for a vibrant and dynamic community that freely shares their specific knowledge and helps each other.

Humility is a lesson I’ve learned and I’m still learning it.  A  couple of years ago, while attending my first Tableau conference, I was introduced to one of the original Zen Masters.  I was introduced as a “jedi” and I thought I was.  I had been using Tableau just long enough that I knew a fair amount but didn’t yet realize how much I didn’t know.  Sensing my know-it-all attitude, this individual patiently showed me a few things I had never considered and then kindly invited me to get in touch if I wanted to understand it more.

It ignited a passion in me to learn more, deepen my understanding, and help others with the knowledge I gained.  Along the way, I’ve continually been humbled as others have patiently and kindly corrected my “correct answers” on the online forums,  challenged my assumptions, or confirmed my understanding.  I am incredibly grateful.

Honored? Yes.  Humbled? Definitely.

 

Blackjack! (Tableau deals)

Can’t wait for the Tableau conference next week year? How about playing a game of blackjack against Tableau in the meantime? No, you won’t win real money. But you can sharpen your skills in case a future since the next conference is in Vegas.

By the way, this dashboard uses a little known fact that secondary data sources are many times refreshed only from the cache even when the primary sends a new query to the data source. Want to discuss? Ask me questions, provide feedback and critique in the Tableau Community Viz Talk

Just remember to press F5 (refresh the browser) after you play — or the cards won’t be shuffled (of course, you could use that to your advantage by just pressing the revert button – though sometimes the dealer still likes to shuffle).

Tableau Tips and Tricks ● Story Telling ● Beautiful Data Visualizations