Demystifying how to Deselect Buttons in Tableau


Demystifying how to Deselect Buttons in Tableau

Tableau’s default behaviour is that when you click a data point, it stays selected. This is intuitive behaviour and makes total sense when a click has driven a filter on a dashboard.

However, given the size and creativity of the Tableau community, clicking a data point has been used in countless other ways. Sometimes, you simply don’t want it to remain selected, i.e. when using a sheet to clear the filters on a dashboard. There have been workarounds for this from the simple “Please double-click” to the brilliant, never-ending pages of Josh Milligan.

New features are constantly included into the Tableau suite—one of the reasons we all love the tool—and a recent (v2019.2) powerful change is the ability to update a parameter using an action. Previously, parameters were static user-driven pieces of information; incredibly powerful but static.  Now, they have been given a new lease on life with the addition of parameter actions.

The Power of Parameter Actions

If you haven’t played with them, I’d highly recommend it. Why not try this simple technique to deselect a button as a starter?

Here’s an example of it in action. I’ve left in the default behaviour, so you can see the difference:

This technique works on the principle that a data point only stays selected if it still exists. If the data point disappears, or (in this case) is replaced by another, it loses its selected status. Here, we build a field which toggles odd to even on each click:

1. Create a parameter called Counter with type integer:

2. Create a calculated field to check whether the counter is odd or even:

Okay, strictly speaking, this doesn’t exactly check to see if it is odd or even. Using modulus %2 does, however, return a 0 when the number is even and 1 when it is odd.

3. Create a calculated field called Counter +1:

4. Add the Counter Even/Odd calculation onto Rows (discrete and to the left), and hide the header if desired. Next, add Counter +1 onto Detail as an average:

Note: You can use the odd/even as a ATTR() if you don’t want it to mess up any table calculations, etc.

6. Create your dashboard parameter action to +1 to the parameter value when clicked:

Now, click away on your dashboard…

There are five steps here, but most of these are simple, and you can copy and paste from one workbook to another. Plus, you can use them on many different sheets within a workbook. Let’s face it: the calcs aren’t too complicated either!

Here’s the above example implemented into a fuller featured dashboard:

More About the Author

James Austin (Aus)

Analytics Practice Lead, EMEA
What Makes Good Analytics: The Perfect Toolset for a Data-Intelligent Business We are beginning to enter a golden age for business intelligence. We have been steadily moving in this direction for the 10+ years I ...
Demystifying how to Deselect Buttons in Tableau Tableau’s default behaviour is that when you click a data point, it stays selected. This is intuitive behaviour and makes total sense ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

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
Geschäftsführer: Mel Stephenson

Telefon: +49 (0)211 5408 5301

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