KNOWLEDGE BASE

Updating Dynamic Axis Titles Automatically


Published: 29 Apr 2013
Last Modified Date: 24 Apr 2023

Issue

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

Environment

Tableau Desktop

Resolution

1. Upgrade to version 2023.1 or later.  New to 2023.1, is the dynamic axis title option. The Edit Axis dialog now has the option for Automatic as well as Fixed.  Pick any parameter or single-value field to use the Automatic Axis option.  Right-click on the axis to see the following new option.
User-added image
User-added image

2. For versions prior to 2023.1, use calculated fields to define the axis titles as demonstrated below.

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
    1. Note: the quotation marks may need to change from double (") to single (') in order to function
  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.

Cause

Feature released with 2023.1.

Additional Information


 
Did this article resolve the issue?