Tableau UI Tip 4: How to Pass Filters and Parameters Between Workbooks

  • Advanced
  • Technical Features

Receive Weekly Tips

Follow us on LinkedIn!

This content is excerpted from my book, Innovative Tableau: 100 More Tips, Tutorials, and Strategies, published by O’Reilly Media Inc., 2020, ISBN: 978-1492075653. Get the book at Amazon.

As explained in the previous post in this series, How to Add a Cross-Workbook Menu to a Tableau Dashboard, I often try to separate large workbooks into smaller individual files. This helps with efficiency, managing fields, and maintaining focus on individual business questions. My favorite tactic for linking the individual workbooks on Tableau Public, Tableau Online, or Tableau Server is to provide a recognizable menu to my end users that contains cross-workbook links.

But did you know that not only can you provide the links in Tableau, you can pass filters and parameters between workbooks. For example, if you have parameters for a start date and an end date in ‘Workbook 1’, you can set up your menu link to pass the current values of those parameters to ‘Workbook 2’. This provides a seamless experience and helps you avoid confusion related to how the destination workbook is being filtered. This post shows you how to pass filters and parameters between Tableau workbooks.

Related video tutorial:

Premier Tableau eLearning from Playfair Data TV


How to Pass Filters and Parameters Between Tableau Workbooks

To illustrate how to pass filters and parameters between workbooks, I’m going to start by changing the Minimum Date and Maximum Date parameters in the splash page style dashboard featured in the second UI tip in in this series. I’m then going to link to the Super Sample Superstore dashboard that resides on Tableau Public to show you how we can change the start date and end date of the destination workbook.

To show you the current parameter settings, I’ll navigate to any sheet in the dashboard and show the parameter controls for Minimum Date and Maximum Date.

Current Settings of Minimum Date and Maximum Date Tableau Parameters

As you can see, the date range is set to 9/1/2016 – 3/31/2017. These are the same default settings of the Super Sample Superstore workbook on Tableau Public. We’re eventually going to overwrite the date range of the destination workbook on Tableau Public by passing new date parameters from the origin workbook. To start, I’m going to change the date range to 9/1/2017 – 12/31/2017.

New Settings of Minimum Date and Maximum Date Tableau Parameters

The trick to passing filters and parameters between Tableau workbooks involves dashboard actions and modifications to the URL string. To demonstrate this, I’m going to navigate back to my splash page style dashboard and modify the existing URL dashboard action that was set up for the bullet menu mentioned in the introduction of this post. Of course, you can also set up a new URL dashboard action.

Modifying a Tableau URL Dashboard Action for Bullet Menu

The URL for the destination workbook (which in this case is a Tableau Public workbook) looks like this:

To pass the Minimum Date and Maximum Date parameter values to the destination workbook on Tableau Public, I am going to add this code to the end of the current URL:

?Minimum+Date=<Parameters.Minimum Date>&Maximum+Date=<Parameters.Maximum Date>

The syntax is simply [The name of the field you are changing at the destination] = [The parameter you are passing from the origin, preceded by ‘parameters.’.

A few things to note:

– The field from the origin should be surrounded by <> brackets.
– Add an “&” symbol between each new item you are passing.
– The first item should start with a “?”, but if there is already a question mark symbol in the URL string, use an ampersand instead (the question mark should only be used once per URL).
– I added plus signs (“+”) to replace blank spaces in the URL.

The full URL now looks like this:<Parameters.Minimum Date>&Maximum+Date=<Parameters.Maximum Date>

Now if I click the bullet menu, not only does the Super Sample Superstore workbook open in a new window, but it is filtered to the same parameter values as the origin. Note that the date range of 9/1/2017 – 12/31/2017 overwrote the original 9/1/2016 – 3/31/2017 range.

Destination Super Sample Superstore with New Parameter Values

This did work, but there is no data for 12/31/2017 so the range is cut off on the 30th.

Passing filters works the same way as passing parameters. You can pass an individual dimension member (i.e. dimension filter) along with parameters. For example, perhaps I would like to pass not only a date range between workbooks, but also have the destination filter to a specific region. In this case, I would add a new URL dashboard action to the charts that contain the Region dimension and add this query string to the end of the URL:

?Region=<Region>&Minimum+Date=<Parameters.Minimum Date>&Maximum+Date=<Parameters.Maximum Date>

The dashboard action looks like this:

Passing Region Filter and Date Range Parameters Dashboard Action

Now if I click ‘East’ in one of the charts that are broken down by region, not only does the destination workbook open with the date range from the origin, but it also filters to the East region.

Destination Super Sample Superstore Filtered by Region and New Parameter Values

This example was used purely for illustration purposes, but you can pass whatever parameters, filters, and/or dimension members you would like between workbooks as long as both workbooks contain the same fields! This works on Tableau Public, Tableau Online, or Tableau Server.

Thanks for reading,
– Ryan

Become a member

Get access to this related video & more!

Become a Member

Related Content