2 used cases of Parameter Actions in Tableau (Index charts and Multi-Measures) — Part 1

Sai Krishna
6 min readJul 19, 2023

In Tableau, parameter actions allow users to interact with visualizations by changing the parameter values dynamically. Parameters are user-defined inputs that can be used to control various aspects of a visualization, such as filtering data, changing measures or dimensions, or altering calculations.

Parameter actions enable users to make selections within the visualization and trigger changes in the parameter values, which in turn affect the displayed data.

Used case 1:
Parameter Actions in Index Chart

Index charts allow for dynamic relative time comparison along an axis.

With the use of parameter actions, once a date is selected, all other points change relative to that date.

The index chart has many applications in finance, stock markets, and supply chain industries to assess the change of trends based on the date selected.

Step1 :

Create a basic line chart

Drag the date field on columns and sales on rows.(make the date field continuous in columns)

Step 2:

Add a quick table calculation for the percent difference.

Step 3:

Create a new parameter (Date & time data type) as below.

Step 4: Right click the ‘Sum(sales’) in rows quick table calculation and edit the table calculation.

Select the ‘Relative to ‘ option to be ‘Index date’ ,which is the parameter we created in step 3.

Step 5:

Add ‘Sales’ field again in rows .This will visually provide us the total for that week in the same chart in addition to the % difference we already have

Make this a dual chart and change the ‘Bars’ to ‘Circle’

Step6 :

Drag sales measure into the ‘Marks’ card under colour and change the color to be percentage difference →Relative to →Index chart (to standardise the color with % diff field)

Step 7:

Add this sheet to the dashboard.

Go to the Dashboard toolbar option → Actions → Add Action → Change Parameter.

Step 8:

Select the Source sheet that the Line chart is part of.

Select Target Paremeter,which is the ‘Index date’ parameter in this case.

Select Source field to be the date field .In this case it is ‘week (transaction date).

And thats it!!

And now you click any bar on the graph, the visualization changes dynamically giving the relative % change to that specific week date selected. You can click any point and start observing how other weeks performed relative to the selected date.

This method will save time over using a dropdown for dates and selecting a date from there.Rather than that process, the parameter actions enable to

Used Case 2:

Suppose you created a multi-measure calculated field and are using a parameter ,in this case ‘Select measure’ as per the image below, to change the visualization dynamically for different measures.

One approach to change the visualisaiton is to go to the parameter and select ‘sales’ ,’qty’ or ‘customers’ and the visualisation changes dynamically.

But a more intuitive way is to use ‘Parameter Actions’ .Let's see how to achieve that.

Overview of the steps

Below is the chart we want to affect through parameter actions.

Bar chart showing Multi measures in parameter ‘Select measure’ (Sales,qty or number of customers in dropdown)

In the original parameter created that we passed on to the multi-measure calculation, a value of 1 represents sales, 2 for qty, and 3 for customers.

My multi-measure calculation originally created looks like this:

What we are trying to do is rather than selecting the parameter, we select the respective metrics in the dashboard, and the visualization changes with a click.
Keeping this in mind, let's proceed.

I have 3 sheets one for sales, qty, and customers that give year-to-date totals.

Detailed steps

Step 1:

Create calculated field ,’Parameter Action-Sales’, and type 1 in the calculation.

As 1 represents the sum of sales, we drag this calculated field into the ‘sales’ sheet under marks->details

Calculated filed named ‘Parameter Action-Sales’ with value of 1 as input

Step 2: Drag the calculated field-‘Parameter Action-Sales’ under details as shown in the image below

We repeat this process essentially for other 2 metric sheets with slight changes .Create calculated field ‘Parameter Action -Quantity’ and input value of 2 (as 2 represents quantity in our original parameter ‘Select measure’ and ‘multi measure’ calculated field shown earlier)

we do this step for Parameter Action for ‘customers’ sheet as well and input 3 in the calculated field. drag it into marks →details

So in essence ,there would be 3 calculated fields ,as shown in the image below ,and place each field under respective sheets Marks →Details

Step 3:

Place the sheets in the dashboard .

we placed ‘Sales’ sheet in the ‘sales’ metric KPI, quantity sheet in quantity metric etc( I used a background template to overlay the KPIs on top of the background).

Step4 :

Go to Dashboard →Actions →Add Action →Change Parameter.

Source sheet would be BAN-Sales

Run action on:Select

Target parameter → ‘Select Measure’

Source field →Parameter Action-Sales

Click Ok.

we do this process another 2 times for quantity and customers KPI

Add Action .

Source sheet will be BAN-Quantity

Run action on:Select

Target parameter-’Select measure’

Source field- ‘Parameter action-Quantity.

click ok.

Do this process again for ‘customer’ kpi

Add Action .

Source sheet will be BAN-Customers

Run action on:Select

Target parameter-’Select measure’

Source field- ‘Parameter action-Customers.

click ok.

Step 5:

Now everytime you click the KPI ‘sales’, ‘quantity’ or ‘customers’ , the bar graph changes just by clicking the numbers in the circle as oppossed to selecting a KPI through a drop-down using a parameter.

This approach of clicking the KPI for the bar chart to change is more intuitive and will help user remain engaged.

There are many other used cases for ‘Parameter Actions’ and I just covered 2 of them in this article : Parameter Actions for Index charts and for multi-measures.

I will provide more used cases in the upcoming articles.

--

--