1 Reply Latest reply on Nov 11, 2019 8:54 PM by Peter Fakan

    How to get the filter value "All" if set in the filters

    Akshar Jamgaonkar

      Hello All,

       

      I am trying to save the filters in my application for further processing, I have a filter for example with following values "All", "Texas", "Colorado", "Arkansas".

       

      I am trying to find if the user has modified any filter and only save the filters which user has changed. When i use getAppliedValues i am only getting the values "Texas", "Colorado", "Arkansas". How do i also get the string "All" back if its set.

       

      Have been trying to check API for ways to access it but have not found one. Any help on this would be great. Many Thanks.

        • 1. Re: How to get the filter value "All" if set in the filters
          Peter Fakan

          Hi Akshar,

           

          There's 2 ways I can think of to achieve this, the first one is Josh Milligan's default values technique.

           

          Another method I've had success with is to pass it a rubbish value like 1:1 over a parameter filter, and Tableau throws an error and shows you everything.

           

          Step 1 - create State Parameter, note the value All with the Display As title of 'Australia'

          BOD2.png

          Step 2 - create calculated field - note the value 1=1 for Australia

          BOD3.png

          Step 3 - build your viz and expose parameter control

          BOD1.png

          What occurs is when each state and territory is selected, the calculated field will select it and highlight it. When Australia is selected, Tableau defaults to 'nothing is selected' mode, and displays everything.

           

          HTH

           

          Peter