This year’s Tableau conference in Barcelona made use of an hour each day during lunch to have Tableau employees, customers and partners give their favourite tips and tricks. The Information Lab had both Tom and Craig going up against each other in a 5 minute frenzy with Tom explaining how to take control and understand table calculations and Craig showing his innovative method for clearing dashboard filters. We’ll leave it to the attendees to decide which they preferred but for those who couldn’t make it here’s what you missed.
Clearing All Filters
Once you’ve discovered dashboards and the power of the filter action you’ll find users saying “That’s great, but how do I quickly clear all those filters?” Maybe you’re delivering over Tableau Server and you want to avoid your inbox being filled with the same question. You could of course hope they spot the ‘revert all’ button but it’s not really clear, you may have even hidden it when embedding. What we could really do with is a button stating ‘Clear All Filters’ so let’s see how we can achieve this.
If you look at my workbook used to demonstrate the trick at the Conference you’ll see I prefer to refer to this functionality as ‘Selecting All’. If you think of how we currently clear quick filters it’s done by selecting the (All) value, so let’s start by replicating this.
You may have in the past created a view specifically for filtering a dashboard, in my example I place region on to the columns shelf and again on to the text shelf to create a horizontal list. This is nothing new, but what about the rows shelf? What if we essentially created a header for these regions which would select every region if it was clicked? This is done by creating a calculated field containing a simple static string: “(All)”.
If you add this to your dashboard and select ‘use as filter’ you should find that selecting a specific region filters the dashboard as expected but clicking our (All) header selects all regions, effectively clearing the filter.
But this is only half the battle, how does it help us with a clear all filters button? Think of clearing all filters as selecting all values in the filtering dimensions. What we therefore want is a header which will select all possible values of the dashboard. Take a look at the ‘Clear All’ page in the example workbook. In this view I’ve left the region values on the text shelf but have moved the second dimension ‘Category’ to the columns shelf along with my ‘Clear All Filters’ calculated field which is placed above it. The result? A very messy view in which you can select all the values of region and category by clicking the clear all filters header. But we can control how much of a view can be seen in a dashboard. So by placing the view onto the dashboard, fitting width and setting the height at around 45 pixels all that mess is now hidden and all we’re left with is a button which will select all values. All that’s left is to edit the dashboard actions to apply this button to all filtered views and we’re done!