How-To: Automatically Deselect Marks in Tableau

by Cecily Santiago

Have you ever wanted to disable selection of marks in your vizzes in Tableau?

Maybe your users are meant to click on marks for interactivity, but you don't like the way marks get outlined after they're clicked.

The bar for "Storage" is selected. Other bars fade into the background, and the "Storage" bar has a black outline around it.

Perhaps you tried using a dummy variable to remove unwanted highlighting, but still didn't like the results.

Highlighting is removed, but still when the bar for "Storage" is selected, the black outline appears.

Or maybe you're just working through Andy Kriebel's Workout Wednesday #WoW2024 Week 15 and trying to replicate his requirement that marks automatically deselect, as seen on his dashboard. Although I've found myself wanting to automatically deselect marks before, it was this challenge that finally pushed me to learn how.

Here's a step-by-step guide using Tableau's built-in Superstore data with screenshots of each step.

  1. Create your chart.

I've made a simple bar chart with Tableau's built in Superstore dataset, which you can see above.

  1. Create a TRUE and a FALSE calculated field
Create a calculated field from your data pane, once for TRUE and once for FALSE
Name the first field "TRUE." It is a Boolean field containing the value TRUE.
Name the second field "FALSE." It is a Boolean field containing the value FALSE.
Your calculated fields will appear in your data pane.
  1. Drag "FALSE" onto detail on your sheet.
Drag the "FALSE" pill from your data pane onto "Detail" on the Marks card.
It will now appear on your marks card as "Detail."
  1. Create a filter action.
Go to the "Worksheet" menu and select "Actions..."
In the "Actions" dialogue box, click "Add Action" and select "Filter..."
  1. Configure the Filter Action
    1. Give the action a descriptive name
    2. Select the desired sheet as both "Source Sheets" and "Target Sheets."
      1. Note: If you need to do this on multiple sheets, don't add them here. Create a new filter action for each sheet.
    3. Set "Run action on" to "Select."
    4. Set "Clearing the selection will" to "Show all values."
    5. Set "Filter" to "Selected Fields"
    6. Click "Click to add" and select "FALSE."
    7. Change the "Target Field" from "FALSE" to "TRUE."
    8. Hit "OK" to return to your list of actions. Hit "OK" again.
Give the action a descriptive name. Set the source and target sheets to the sheet you're working on. Set "Run Action on" to "Select." Set "Clearing the selection will" to "Show all values."
Set "Filter" to "Selected fields." Click "Click to add" to select the source field.
Find and selected "FALSE."
Change the "Target Field" to "TRUE."
Make sure your configuration is as shown, and click "OK."
Make sure your action is listed and click "OK" again.

Voila! You've created an action to automatically deselect marks on your viz! Repeat this process for any other sheets you want. These Worksheet Actions carry over when you add the sheets to a dashboard. Now your users won't see undesired highlighting or outlining on your marks when interacting with your dashboard.

Check out my "How To: Automatically Deselect Marks" dashboard and download the workbook!

Giving credit where credit is due:

Thank you to Andy Kriebel for creating the #WoW that challenged me to learn this process.

Thank you to Luke Stanke's blog on the same topic. While my method is slightly different, his helped me figure it out.

And thank you to Yuri Fal's "Clear Selection" dashboard, which I downloaded and dissected. My method is really a blend of Luke Stanke's and Yuri Fal's methods.