5 min read

 

This blog series aims to introduce Tableau parameters and demonstrate how to use them in data analytics. First, we will establish what parameters are, and why they are an indispensable tool in self-service analytics. Then, we will use three use cases to illustrate how parameters can solve business problems.

 

Content

  1. What is a Tableau Parameter
  2. Why are Parameters Important
  3. Use Cases:
    • Dynamic Benchmarking (Part I)
    • Payback Period Sensitivity Analysis (Part II)
    • Dynamic Moving Average (Part III)

 

1. What is a Tableau Parameter

Tableau parameters are like the control components such as the steering wheel and the brakes in your car. More specifically, parameters are variables created by the designer to give users the ability to control how the Viz behaves.

Typically, parameters can be used to:

  • adjust the input value of a calculation, 
  • switch between chart types, and
  • replace the input values in filters or reference lines.

 

2. Why are Parameters Important

Parameters are one of the most powerful tools for providing interactivity and flexibility to your end users. And why do we need flexibility? Because different users have different business needs, and it is unlikely that a static dashboard can meet all their needs.

In particular:

  • Many business decisions are built upon assumptions, and parameters allow the users to experiment with what-if scenarios and test their assumptions.
  • Different stakeholders have different needs, and parameters make it possible for users to adjust the Viz according to their needs, enabling self-service analytics.
  • Parameters improve user engagement and often enhance the retention of insights.

 

3. Use Cases

 

3.1 Dynamic Benchmarking
The Business Problem:

The company operates across multiple states and territories. It wants to know which states have met the benchmark (target) profit margin and which haven’t. However, the problem is that the company has not just one product, but 17 different product lines, each having a different benchmark. For example, “Art” products typically have a higher profit margin than “Tables”.  Do we need to build 17 different charts, one for each product line?

 

The Solution:

We can build a single chart and use a parameter to adjust the benchmark profit margin, as we switch between different product lines.

 

Step 1: Start with a bar chart with State vs. Profit Margin
  1. Drag Profit Ratio onto the Columns shelf, and State onto the Rows shelf.

 

Step 2: Filter by Sub-category
  1. Drag the Sub-category pill onto the Filters shelf, and click on it to select Show Filter.
  2. Click on the filter’s downward arrow and select Single Value (list). This helps us to limit our selection to one product line each time.

 

Step 3: Creating and Configuring the Parameter
  1. Right click on an empty space in the Data Pane, and select Create Parameter.
  2. In the Edit Parameter window that pops up, configure the setting as below. We want to set the benchmark profit margin’s minimum value to 0 and maximum value to 1 (which is 100%).
  3. After creating the parameter, right click on it and select Show Parameter.

Step 4: Creating a Reference Line whose position is determined by the Parameter

Just by creating a parameter will not make our charts dynamic, we need to relate the created parameter to some other tools or functions in the Viz.

  1. Add a Reference Line to our chart by dragging it from the Analytics Pane and drop it onto our chart.
  2. Configure the reference line as below, and make sure to set its Value to the Profit Benchmark parameter we have created.

Step 5: Creating a Calculated Field that changes the bar chart’s colour based on the Parameter
  1. Right click on an empty place in the Data Pane and Select Create Calculated Field.
  2. Type in [Profit Ratio] > [Profit Benchmark]. We want to colour-code the states who are above the benchmark differently from those below, dynamically.

 

Final Viz in action:

We have successfully created a dynamic benchmarking report! This report enables the user to adjust and compare different profit benchmarks for different product lines, all within a single Viz!

 

In Part II of this series, we will experiment with what-if questions, and perform a sensitivity analysis on Payback Periods. Stay tuned!

 

 

 

Martin Ding
Author: Martin Ding