Tableau Quick Tip: Dynamic Chart Title
Dynamic Chart Title in Tableau

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

No alt text provided for this image
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.

No alt text provided for this image
Drop-down to select Dimension & Measure
No alt text provided for this image
Create a Parameter

Parameter 1: Choose Dimension

No alt text provided for this image
Parameter 1: Choose Dimension

Parameter 2: Choose Measure

No alt text provided for this image
Parameter 2: Choose Measure
No alt text provided for this image
"Show Parameter" to create a drop-down menu

Create Calculated Fields

No alt text provided for this image
Create a Calculated Field

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”.

No alt text provided for this image
Create a calculated field: Choose Dimension
No alt text provided for this image
Create a calculated field: 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

No alt text provided for this image
Drag into rows and columns shelves

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.

No alt text provided for this image
Dynamic Features

Dynamic Chart Title

  1. Double-click on the chart title
  2. Remove the default <Sheet Name>
  3. Insert parameters using the “Insert” button as shown below
  4. Change the colours of the parameters. Remember to highlight the parameters before changing the colour

No alt text provided for this image
Dynamic Chart Title

Dynamic Field Label

  1. Hide field label

No alt text provided for this image

2. Drag the “Choose Dimension” parameter into the Rows. **Place it in front of the “Choose Dimension” field.

No alt text provided for this image
No alt text provided for this image
Right-click on the field label to format
No alt text provided for this image
Align to middle

Dynamic Axis Title

  1. Remove axis title

No alt text provided for this image
Right click -> Edit Axis
No alt text provided for this image
Delete the axis title

2. Add “Choose Measure” to Columns

No alt text provided for this image
Add "Choose Measure" to Columns

3. Hide field label

No alt text provided for this image
Right Click -> Hide field labels for columns

Final Outcome

At this point, you have created a dynamic visual its features will change according to the user’s selection.

No alt text provided for this image
Dynamic items are highlighted in red boxes

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?:)

No alt text provided for this image
Photo by Lute on Unsplash

要查看或添加评论,请登录

Chee-Chuan Foo的更多文章

  • Machine Learning For Beginners

    Machine Learning For Beginners

    Introduction For beginners, machine learning might seem intimidating with all the calculus, statistics, and algorithms…

  • Setup an AWS database for FREE

    Setup an AWS database for FREE

    Setup free tier PostgreSQL database on AWS RDS Introduction For a student or beginner data scientist, you need to equip…

    4 条评论
  • Basic Data Preparation with Python (Stock Price Data)

    Basic Data Preparation with Python (Stock Price Data)

    Python stock price analysis 03: Learn typical data preparation process with stock prices data Python Stock Price Data…

  • Looping API Request in Python to retrieve data in bulk

    Looping API Request in Python to retrieve data in bulk

    Looping API Request in Python to retrieve data in bulk Python stock price analysis 02: Extract stock prices with a list…

    2 条评论
  • Extract stock price data with Python

    Extract stock price data with Python

    Python stock price analysis 01: Get stock price data online Introduction Stock markets from all over the world generate…

  • Pivot Table in?Python

    Pivot Table in?Python

    Drag & Drop Data Analysis in Python Introduction Exploratory Data Analysis in Python was typically done by using the…

  • Tableau Desktop Quick Tip: The Problem with Pie Chart & Legend

    Tableau Desktop Quick Tip: The Problem with Pie Chart & Legend

    Data analysts always take pie charts and legends for granted, especially with many categories in a field. When it comes…

  • Simple Steps — Data Exploration

    Simple Steps — Data Exploration

  • Problem Solving: List Comprehension (Python)

    Problem Solving: List Comprehension (Python)

    Problem Solving: List Comprehension (Python) In my previous article, "List Comprehension (Python) Explained" I've…

  • List Comprehension (Python) Explained

    List Comprehension (Python) Explained

    List Comprehension (Python) Explained List is one of the simplest and most common data structure in Python. Today in…

社区洞察

其他会员也浏览了