3 Replies Latest reply on Nov 10, 2014 7:30 AM by Joe Oppelt

    Collapsible Filter Container

    jagam jaga win

      I would like to collapse the Entire Filter container after filter selection.


      There are about 5-6 filters in the dashboard and I would need the container to be collapsed when not in use.


      Is this doable ?


      with Tableau Java Script API ?
      Using Javascript in an embedded view ?


      Please advise.

        • 1. Re: Collapsible Filter Container
          Shawn Wallwork

          I recently watched a video that shows collapsing worksheets, and hiding filters. I think it was one of Matt Lutton's video series. Matthew?



          • 2. Re: Collapsible Filter Container
            Matt Lutton

            The video mentioned is here:

            Sheet Swapping and Popping with Joe Oppelt (and a Tip on Searching the Tableau Forums) | mluttonbi


            I'm not sure if this will get you to a fully collapsible filter container based on what is in use, but it may spark some ideas.


            I actually rarely use the technique in my own work, as of late, but Joe Oppelt or Ville Tyrväinen may be able to help you if you have a TWBX to share, along with a clearly defined goal for that sample TWBX.


            I would think the JavaScript API might make this type of thing a bit simpler, if you have the resources and/or ability to learn or utilize it.  But I cannot recall an seeing a specific example.

            • 3. Re: Collapsible Filter Container
              Joe Oppelt

              Jagam -- What sheet popping can do it this:  When some condition occurs that can be detected in a calc field, the calc field can be used as a filter on a dummy sheet to expand or collapse the dummy sheet.  You hide the "engine" of that dummy sheet behind some other object (another sheet, a blank text box, another container, etc.) and when the dummy sheet is expanded it "pushes" the filter (or other object it is controlling) out from behind the object that the "engine" is hiding behind.


              So you can make a filter seem to collapse (disappear) if that's what you wnat to do.


              (I am assuming that by "collapse" you mean disappear.)


              The one question I have is this:  How can you tell that the user has selected something?  I guess if you start out with the value of the field null, then when the value is anything but null, we can know that the user has selected something.  If you can do it that way, then the calc field that you use to display/hide the dummy sheet would be somethng like this:


              IF ISNULL([filter field]) then 1 else 0 end


              (or   IF [filter field] = "" then 1 else 0 end)


              Put that on the filter shelf of the dummy sheet and select for 1.  If the value = 1 then the field is null and the dummy sheet is expanded, and that will make the real filter visible to the user.  As soon as the user selects something, the value of [filter field] is no longer null.  The dummy sheet collapses, making the filter for [filter field] hide behind the masking object.