Filtering Multiple Data Sources Using Parameters in Tableau 6

Data

Filtering Multiple Data Sources Using Parameters in Tableau 6

//

As your Tableau Software dashboards become more complex you’ll often find yourself needing to mesh multiple data sets from two or more sources. One limitation this creates is the inability to define global filters to control all worksheets throughout your workbook. While actions can be used to filter multiple data sets, their implementation and workflow often differ from how a quick filter would be used.

With Tableau 6 we can now leverage parameters to mimic a quick filter interface while at the same time utilize their global nature to provide a single filter across multiple data sources.

Step 1: Define your parameter

In our demonstration, we’ll be using the Superstore Sales and Coffee Chain data sources which ship with Tableau. Both data sources have region dimensions (Region in Superstore Sales, Market in Coffee Chain) which have the same four possible values: East, West, Central, and South.

We think it would be cool to show a comparison of profit/sales by geographic region for both stores so we’ll need to create a filter to toggle by region. We’ll start by creating the parameter and loading it with values from one of the region fields. Once created, we can add it to our dashboard in the same manner we would add a quick filter.

Create Region Parameter

Step 2(a): Filter each worksheet by your parameter (simple)

After the parameter is created we can then begin filtering worksheets by the chosen parameter value. The quickest implementation is to simply filter by Condition. From the Condition tab you can specify a simple Boolean formula to check a dimension against the selected parameter value.

Filter by Condition

Step 2b: Filter each worksheet by your parameter (advanced solution)

A slightly more complex but much more powerful solution is to create a calculated field to use as our filtered dimension. In doing so we can provide a bit more functionality to our parameter filter (such as adding an All option). After adding All as an option to our parameter list, we can perform some simple logic to check whether we should filter a record or not.

Filter Calculated Field

Our calculated field Filter: Region will evaluate to one of two strings: Show or Do Not Show. If the parameter selection is equal to All or the current record’s Market field, the record should be displayed. Otherwise, the record should be filtered out.

By adding the calculated field to the filter shelf we can then choose to display only records with a Filter: Region value of Show, and repeat the process for any other worksheets in our workbook.

The Result

The final result is the ability to filter multiple data sources from a single parameter option. Since parameters can be displayed in many of the same formats as quick filters, the end user will never know the difference.

Dashboard Filtered by Parameter

Parameter Filters (Packaged Workbook)

More About the Author

Eric Shiarla

Managing Director, Americas
What the 2013 Tableau Customer Conference Means to InterWorks We’re less than a month away from the biggest Tableau event of the year: TCC13. If you’ve attended TCC in the past, especially last ...
Tableau Online – Cloud-Based Tableau Server Hosting Now Available Tableau Server is officially online. Users can now take advantage of their data from virtually anywhere with Tableau Online, a hosted ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072

×

Love our blog? You should see our emails. Sign up for our newsletter!