Tableau Quick Tip: Dynamic Chart Title
Create a drop-down to change the x & y axes. Make chart title change according to selection.
Introduction
Data Analyst sometimes creates a dashboard for somebody who doesn’t know how to use Tableau Desktop (Viewers). We want to allow users to switch the x & y axes using a drop-down menu to provide convenience.
In addition to that, we would like the chart title to state which Dimension or Measure was chosen by the users.
Data &?Workbook
Data: GDrive Link
Workbook: Tableau Public Link
Youtube: Chee-Chuan
Create a Bar?Chart
Create Parameters
A parameter is used to create a drop-down list in Tableau. Therefore, we need to create 2 parameters, 1 for dimension and another one for measure.
Parameter 1: Choose Dimension
Parameter 2: Choose Measure
Create Calculated Fields
When the user chooses “Category” in the “Choose Dimension” drop-down menu, this calculated field will be equivalent to the “Category” field. With that said, we need to list out all values in the drop-down list so that when the user picks any one of these fields, the chart can change according to the selection. The same logic applies to “Choose Measure”.
*Note that each aggregation need to specify separately for Choose Measure
Design the?Chart
Replace the dimension and measure with “Choose Dimension” and “Choose Measure”
领英推荐
Try selecting different values in your drop-down. The chart should change dynamically according to your selection.
We’d like to improve user experiences by making the chart title, field label and axis title dynamic.
Dynamic Chart Title
Dynamic Field Label
2. Drag the “Choose Dimension” parameter into the Rows. **Place it in front of the “Choose Dimension” field.
Dynamic Axis Title
2. Add “Choose Measure” to Columns
3. Hide field label
Final Outcome
At this point, you have created a dynamic visual its features will change according to the user’s selection.
Video Tutorial
Final Words
Thank you for reading this article till the end. If you’d like to receive similar content do follow and subscribe to my medium account. Till the next one, see you again?:)