• Brian Moore

Building Better Dashboards Through Interactivity - Part 1: Filtering with Parameter Actions

Tableau has some incredibly powerful tools for interacting with your data. This 4-part series contains a number of tips and tricks for leveraging those tools to build business dashboards that are more flexible, more engaging, more powerful, and generally, just a lot more fun to use. This is part 1 of the series and covers how to use Parameters and Parameter Actions to filter your dashboard. It also covers how to use calculated fields to "remove" a Parameter selection, and how to counter Tableau's default highlighting using Highlight Actions. Check out the Resources below for a link to the dashboard referenced in this blog post, and to a short video demonstrating all of the steps in this post.

Resources:

Superstore KPI Dashboard on Tableau Public

Building Better Dashboards Through Interactivity - Part 1 Video

Using Actions to filter your dashboard not only looks much nicer than Quick Filters, but it is also better for performance and provides a more satisfying user experience. There are several methods for doing this including Filter Actions, Set Actions, and Parameter Actions. In this example, we are going to use Parameter Actions. The first thing we want to do is create our Parameter and our Filter Calculation

  1. Create a new parameter called "Region Par", select String as the Data Type and set the Current Value = All

  2. Create a calculated field called "Region Selected" for our filter

  3. [Region Par]="All" OR [Region Par]=[Region]

  4. Go to one of the worksheets that you wish to filter (ex Metric by Sub-Category)

  5. Drag the "Region Selected" field to the filter shelf and set filter = True

  6. Right click on the filter, select "Apply to Worksheets" then "Selected Worksheets" and select all of the worksheets that you want to apply the filter to

Next we want to create our Parameter Action

  1. Click on Dashboard > Actions

  2. Click "Add Action"

  3. Select "Change Parameter"

  4. Give the Parameter a name

  5. Deselect All Worksheets (see bonus tip below)

  6. Select the worksheet that will drive the Parameter Action (ex. Metric by Region)

  7. Choose "Select" under the "Run Action On" options

  8. Under "Target Parameter", select the "Region Par" parameter

  9. Under "Field", select the field that we want to pass to the parameter, in this case "Region"

  10. The final parameter should look like this

Bonus Tip - In a Tableau Action there is no option to bulk select or bulk deselect worksheets, but what you can do is click on the first worksheet in the list, hold down shift, click on the last worksheet in the list, and then click on the checkboxes to select or deselect all sheets.

Now when we click on any bar in the Metric by Region sheet, we can filter the entire dashboard to that region. However, you may notice that unlike filtering with Action Filters or Set Actions, you can't click again to remove the filter. Once the filter is applied, there is no way to remove it. We can fix this with another calculated field.

  1. Go to the "Metric by Region" worksheet

  2. Create a calculated field called "Region Remove"

  3. IF [Region]=[Region Par] THEN "All" ELSE [Region] END

  4. Drag the "Region Remove" field to Detail

  5. Update your Dashboard Action

  6. Go to Dashboard > Actions

  7. Click on the Region Parameter action created in the previous step

  8. Click "Edit"

  9. Under "Field" select the "Region Remove" field instead of "Region"

Now you can click on a region to filter the dashboard, and then click on that region again to remove the filter. You have probably also noticed that when you click on a mark, the selected mark retains it's formatting, and all of the non-selected marks turn a "washed-out" version of their color, which often times is unattractive and in some cases can be very distracting. Next we'll cover how to counter that default highlighting and get more control over the formatting of both the selected and non-selected marks.

  1. Go to the "Metric by Region" worksheet

  2. Create a calculated field called "HL" that is just a blank calculation (enter just "" in the calculation body)

  3. Drag the "HL" field to Detail

  4. Go back to the dashboard and add a Highlight Action

  5. Click on Dashboard > Actions

  6. Click "Add Action"

  7. Select "Highlight"

  8. Give the Highlight Action a name

  9. Under Source Sheets select the "Metric by Region" worksheet

  10. Under Target Sheets select the "Metric by Region worksheet

  11. Choose "Select" under the "Run Action On" options

  12. Under "Target Highlighting" choose "Selected Fields"

  13. Select the "HL" field

  14. Click OK

  15. The final highlight action should look like this

Now when you click on a bar, you can filter the dashboard to that Region, and all marks retain there original formatting, but it is difficult to see which, if any, Region is selected. We can remedy that with the use of color

  1. Go to the "Metric by Region" worksheet

  2. Drag the "Region Selected" field to color

  3. Set the colors for the True and False values

  4. In this worksheet I have set the color for True to be that same baseline Blue color, and for False I have set it to the same color as the background

That is all for today. Keep an eye on our blog for parts 2 through 4 over the coming weeks which will cover using BAN's as KPI selectors, dynamically formatting labels and tooltips, sheet-swapping with parameters, creating "scroll" buttons, and adding instruction "overlays". If you have any questions or comments on these tips, please let us know at info@cleartelligence.com.

Ready to Make Analytics Work for You

Learn more about how we can help get your project started

New England Office

275 Grove Street, Suite 2-400

Newton, MA 02466

(617) 340-7740

Tri-State Office

100 Overlook Center, 2nd Floor

Princeton, NJ 08540

(609) 246-0029

Services

  • White LinkedIn Icon
  • White Twitter Icon
  • White Facebook Icon

More

 © Cleartelligence, Inc. 2018

All Rights Reserved