7 Replies Latest reply on Mar 29, 2018 11:07 AM by Barry OConnor

    Button to Clear All Filters

    Lily Doo

      Hello! I want to have a button where when I click it, it deselects all the filters on my dashboard. I followed the following KB to create a button to reset all filters on my dashboard, except instead of deselecting everything it selects everything, and I can't quite figure out how to get it to deselect everything.

       

      Creating a Button to Reset All Filters in a Dashboard | Tableau Software

       

      Thanks in advance!

        • 1. Re: Button to Clear All Filters
          Soham Wadekar

          Hi Lily,

          Clearing all the filter means "selecting everything". I am not getting the logic of deselecting the filters as "deselection" will give you a blank dashboard.

          By following the article, what you are doing is clearing or resetting all "user" performed selections thus resulting in selection of all filters to give you the default view of dashboard.

          • 2. Re: Button to Clear All Filters
            Lily Doo

            Hey Soham,

            Weird as it might sound, a blank dashboard is exactly what I am looking for. I am trying to find a way to deselect everything with a button to get a blank dashboard. The reason being, in my real workbook, I have a dataset that is enormous. When the user plays around with the filters and wants to reset things, to have everything set to All takes forever to load.

            • 3. Re: Button to Clear All Filters
              mark santino

              Hi Lily -

               

              Regarding your inquiry, this link might be of interest to you. Clearing All Actions in a Dashboard with One Click | Tableau Software 

              • 4. Re: Button to Clear All Filters
                mark santino

                Apologies. I just realized you mentioned the same KB article.

                • 5. Re: Button to Clear All Filters
                  Barry OConnor

                  Lily,

                  The trick is to create actions and use the actions as the filters.  I was able to adjust your sample to do this.  Unfortunately, I am using Tableau 10.5, so you will not be able to opening if you are using 10.0.  But, you can reference this page: Reset Filters in Tableau Desktop .  What is neat about doing it this way is the Reset Filters click action will alternate from setting and clearing the filters. 

                  First create two new measures: One called Clear and one called Clear Prov.  Change the Clear Prov graphical role to State/Province.  This needs to be done because it has to be the same type as the Province dimension.

                  These will be used by the actions to clear the filters.  Place both into the Detail card in the Reset Sheet worksheet.

                   

                  From here create the three separate actions, one for each measure you are filtering (Province, Role, Thing). 

                  The settings will look like this:

                   

                  Do the same for Role.  Then for Province create it the same way except place Clear Prov in the Source Field.

                   

                  Remove the original filters for Province, Role and Thing. Then click on the Reset Filters button.  That should create the action filters in the Sheet 2 worksheet.

                  Go back to the dashboard and add the three action filters.  Those filters should now clear and reset when the button is clicked.

                  • 6. Re: Button to Clear All Filters
                    Lily Doo

                    Thanks for the suggestion, Barry! I like this idea, but is there a way for it to instead of alternating between setting and clearing the filters, to have it just clear the filters each time I click it? Clear the filters as in deselect everything and just give me a blank sheet.

                    • 7. Re: Button to Clear All Filters
                      Barry OConnor

                      I think there is a way to do the way you'd like.  Go back to the actions and set the Clearing the selection will (in the Target sheet part) to Exclude all values.