Skip to main content

/*************************

** Essential Exposition **

**************************

** I'm using Tableau 9, **

** and I'm going insane **

*************************/

 

In the attached example workbook (which uses the Sample - Superstore dataset), I created a Group from Region (it's meaningless, and just for the purposes of this example).  I then put that group in a hierarchy with Region.

 

  • Region Hierarchy
    • Region (group)
    • Region

 

Then I put the hierarchy into the chart, with the intention of the user being able to expand and collapse that hierarchy at will.  Here's how I defined the tooltip, and what the resulting view looks like:

 

Updating tooltips when hierarchies are expanded

 

Screen+Shot+2015-05-07+at+7.45.16+PM.png

 

When the hierarchy is collapsed, the <Region (2)> field is not displayed.  That's great news!  I don't want to show it, because we're not considering that level of aggregation.  However, obviously I don't get the same effect when the hierarchy is expanded.

 

Screen+Shot+2015-05-07+at+7.48.51+PM.png

 

It shows both fields.  I would like to hide the Group field when the hierarchy is expanded, but I can't for the life of me figure out how.

 

Here's one example of how I've tried to remove it so far.  I had hoped that maybe the <Region> field is NULL when the hierarchy is collapsed, and maybe that was why that line disappeared.  So I thought maybe I could create a calculated field that would be NULL when the <Region> field was not NULL.  Then I could put that new calculated field on the same line as the Group field, forcing it to be NULL whenever the <Region> field was available (i.e. the hierarchy was expanded).  Here's what that looked like:

 

Screen+Shot+2015-05-07+at+7.52.11+PM.png

 

Screen+Shot+2015-05-07+at+7.53.09+PM.png

 

But that just yielded a big pot of diddly.  I guess <Region> isn't NULL in the underlying data, which is obviously great news, because that's definitely how data works, but still a bummer for the sake of this effort.

 

An important note is that you can't use Group fields in Calculated Fields, and I have absolutely NO idea why.

 

Does anyone have any idea how I could pull this off?  Thanks so much for any tips or help you might be able to provide!

2 answers
0/9000