This is a small tutorial on how to add a selected dimension member to a graph to add more context. While this can be done alternately using Parameters in Tableau, this method uses a Calculated Field.

Where can this be used?
This can be used as a heading for a graph showing all values by default and the selected value otherwise. See images below.


In the image above, the underlined ‘All Sub-Categories’ is our point of interest. We want this to change based on the our selected Sub-Category on
the Bar Graph for Profit to the left.

Step 1:
Once you’ve got the graphs in place, create a Calculated Field. In this case I call it ‘Selected SubCat’. Type down the If-Else statement as shown below.
This prompts it to show ‘All Sub-Categories’ if there are no selections made. Else it shows the selected Sub-Category. Click on Apply and close.

Step 2:
Place this on the text tile in the Marks Card. Once here, you can tailor the statement to suit your requirement. I’ve added ‘Regional Profit Ratio for’ followed by the Calculated Field.

Step 3:
Remove the title and add the sheets to the dashboard. And the graph using which you wish to drive the other sheets needs to be used as a filter. This can be done as seen below.

In the below image you can see the heading for the second graph change per your selection in the first (driving) graph.

So, there you have it. A small tutorial on adding contexts to headings without parameters.


Shashanka Rao
Author: Shashanka Rao