KNOWLEDGE BASE

Updating Dynamic Axis Titles Automatically


Published: 29 Apr 2013
Last Modified Date: 27 Jun 2016

Issue

When using a parameter to select an axis, the axis title does not update automatically.

Environment

Tableau Desktop

Resolution

Use calculated fields to define the axis titles.

Creating the Calculated Fields

  1. Create a calculated field for one axis.
  2. Structure the formula of the calculated field as follows:
    CASE [AXIS SELECTOR PARAMETER]
    WHEN "Parameter option 1" THEN "Parameter option 1"
    WHEN "Parameter option 2" THEN "Parameter option 2"
    WHEN "Parameter option 3" THEN "Parameter option 3"
    WHEN "Parameter option 4" THEN "Parameter option 4"
    WHEN "Parameter option 5" THEN "Parameter option 5"
    ELSE NULL
    END
  3. Add a title to the new calculated field, and click OK.
  4. Repeat steps 1 - 3 for the second axis.

Removing Existing Axis Titles

  1. Right-click on the axis in the visualization and select Edit Axis....
  2. Delete any text in the Title box in the bottom right, and click OK.
  3. Repeat steps 1 and 2 for the second axis.

Adding the Calculated Fields to the Visualization

  1. Drag each calculated field f to their respective row shelf or column shelf.
  2. Right-click on the column field label (it will appear as the title of the calculated field in the visualization), and select Hide Field Labels for Columns.
  3. Right-click on the row field label (it will appear as the title of the calculated field in the visualization), and select Hide Field Labels for Rows.
  4. Right-click the Y-axis title, and select Rotate Label if desired.
 
Did this article resolve the issue?