Last Modified Date: 03 Dec 2020
ResolutionUse calculated fields to define the axis titles.
Creating the Calculated Fields
- Create a calculated field for one axis.
- 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
- Note: the quotation marks may need to change from double (") to single (') in order to function
- Add a title to the new calculated field, and click OK.
- Repeat steps 1 - 3 for the second axis.
Removing Existing Axis Titles
- Right-click on the axis in the visualization and select Edit Axis....
- Delete any text in the Title box in the bottom right, and click OK.
- Repeat steps 1 and 2 for the second axis.
Adding the Calculated Fields to the Visualization
- Drag each calculated field f to their respective row shelf or column shelf.
- 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.
- 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.
- Right-click the Y-axis title, and select Rotate Label if desired.
Additional InformationAlternatively, a Sheet Swap selector can be used to swap from a sheet to another (rather than swapping a measure). For more information about this topic, see the following documentation:
- Create a Sheet Selection Menu for a Dashboard in Tableau Help
- How to Dynamically Change Axis Measures and Formats in Tableau Using Parameters (third party)
Discuss this article...
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials