How to Automatically Deselect Marks in Tableau

UPDATE: There’s been a lot of discussion on Twitter about the best method for automatically deselecting marks or “disabling” marks selection. After a half-dozen methods the Tableau community landed on the following:

Yuri’s approach is simple and requires only five steps. There isn’t a blog post for it, but it is on the forums.

Note that Yuri is the originator of this methodology and I just wanted to blog on it because I think it is very elegant and requires only simple calculations. Because I like simple solutions, I’m deleting my post and sharing this simple methodology.

Step 1: Create your visualizations.

For our example its just a simple bar chart. Notice how you can still highlight values and it shows an outline around the box.

Step 2: Create two calculations one where the calculation is equal to TRUE and the other where the calculation is equal to FALSE.

				
					  // TRUE
    TRUE
				
			
				
					 // FALSE
    FALSE
				
			

Step 3: Add these calculations to the marks card.

Step 4: Create a highlight action that highlights the TRUE calculation on click.

You can use either TRUE or FALSE, both work.

Step 5: Remove the selection border with a filter action where on select the selected sheet will filter the source field of TRUE to the target field of FALSE.

Trust me. Watch the GIF below and see it in action.

And thats’ it. No fancy calculations, no data blending or duplication.

Accelerate and automate your data projects with the phData Toolkit

Data Coach is our premium analytics training program with one-on-one coaching from renowned experts.