1 2 3 Previous Next 33 Replies Latest reply on Apr 22, 2016 5:49 PM by Joe Oppelt Branched to a new discussion.

    Show/Hide Filters Based On Sheet Selection

    Priyanka Reddy

      Hello Everybody,


      Can anyone suggest me whether there is any way to" Show/Hide quick filters based on sheet selection"?

      Is it possible to do it by any fuctions or API's?

        • 1. Re: Show/Hide Filters Based On Sheet Selection
          Tracy Rodgers

          Hi Priyanka,


          There is no way of doing this currently, that I am aware of. However, there is an Idea out there which you could vote on:





          • 2. Re: Show/Hide Filters Based On Sheet Selection
            Jonathan Drummey

            Thanks to Joshua Milligan for his post Sheet Selection on Steroids | VizPainter that got me thinking on this topic, I had an idea on how do meet the requirements to hide a Quick Filter based on sheet selection, see the attached workbook. After building it, I realized that I'm pretty sure I've seen something like this before at some point on the forums.


            The dashboard has the following elements:


            - A boolean parameter to swap between a Market view and Product view.

            - A calculated field to use as a sheet selector filter, using the technique laid out in Creating a Sheet Selector for a Dashboard | Tableau Software.

            - Market bars worksheet that has a Quick Filter on Market

            - Product bars worksheet that has no quick filters.

            - Vertical spacer worksheet that returns a single mark using a fake dimension, the mark and the view are set up to be a tiny transparent white square with no tooltip.


            In the dashboard, the Market & Product bars worksheets are in a vertical layout container and set up to be controlled by the boolean parameter. That parameter and the Quick Filter on Market are put in a second vertical layout container. In-between them goes the Vertical spacer worksheet, that is set to show up when the Product bars are chosen.


            Here's the view with the Market selected:


            2014-02-04 12_51_11-Tableau - hiding a quick filter.png


            Now with the Product view selected, the Market has been pushed down by the Vertical spacer worksheet:


            2014-02-04 12_52_55-Tableau - hiding a quick filter.png




            The final step is to add a floating dashboard element that will go over the Market, for this view I used an explanatory text box:




            For this to work in a production viz, you'd probably want to fix the height of the Quick Filter(s) so as the data changes they won't expand and be visible.




            PS: another option for getting very specific control over views is to use the Javascript APIs.

            5 of 5 people found this helpful
            • 3. Re: Show/Hide Filters Based On Sheet Selection
              Priyanka Reddy
              Hi Jonathan,

              Thanks for the reply.

              Can you suggest me a answer to another question  which i am finding difficult to find

              "Whether We can integrate GPS in tableau",Such a way that it gets current location of the user and filters our data according to the location of the user?"

              Can we implement the above scenario by any Java API's?

              • 4. Re: Show/Hide Filters Based On Sheet Selection
                Jonathan Drummey

                There are three ways I can think of to do this:


                1. One data source would be the original data, the second data source would be a live connection that has the current location of the user. A data blend would then integrate the data sets, and filters with the necessary calculations applied.
                2. Use the Javascript API to pass a set of Tableau parameters to the view that include the current location of the user, and then filters with the necessary calculation applied.
                3. This is a variation of #2: Use whatever web coding environment you want and pass the Tableau parameters as part of a URL string to Tableau, then have the filters in Tableau apply the necessary calculations.

                Russell Christopher might have other ideas as well.

                2 of 2 people found this helpful
                • 5. Re: Show/Hide Filters Based On Sheet Selection
                  Russell Christopher

                  +1. Tableau doesn't "do" GPS, of course --  you'd need to do that programming work on your own. Once you know where you are, it would be easy to pass that information into Tableau Server on the URL or via JavaScript API calls so that Tableau would filter itself accordingly.

                  2 of 2 people found this helpful
                  • 6. Re: Show/Hide Filters Based On Sheet Selection
                    Priyanka Reddy

                    Thank you Jonathan.That was really a helpful answer.

                    Can you please explain it in detail?

                    Can you upload any implemented workbook if you have already worked on it..?

                    • 7. Re: Show/Hide Filters Based On Sheet Selection
                      Jonathan Drummey

                      Hi Priyanka,


                      You can see a basic example of "pick one to see what's nearest" where one set of data is coming from a blended data source in Demonstration #3: Distance from Selected Origin City to Destination Cities in Creating a Dynamic “Parameter” with a Tableau Data Blend | Drawing with Numbers. It uses the great circle calculation from Calculating Distance | Tableau Software to generate the distance. Beyond that, I don't have any further examples.



                      1 of 1 people found this helpful
                      • 8. Re: Show/Hide Filters Based On Sheet Selection
                        Nilay Shah

                        what if you had more worksheets? for example, i have 4 and possibly 5 quick filters.. how do we hide based on what the user chose??

                        • 9. Re: Show/Hide Filters Based On Sheet Selection
                          Colin Thornburg

                          Curious if there were any new updates or workarounds to this?  I'm a fairly new user but spent a good few hours trying to figure out why not applicable filters were showing up even though my visualizations were dynamically changing based on the parameter selection until I found this.  It makes no sense to me why the filters would not follow the same "Display" logic as the viz's.  This is a cool feature but pretty much worthless to me if the filter(s) always remain in place.



                          • 10. Re: Show/Hide Filters Based On Sheet Selection
                            Joe Oppelt

                            Tableau treats your filter object separately from your sheet.  One reason I can see for it is because we can use the same filter on multiple sheets.


                            You can pop out (and hide) filters -- and any other object.


                            We made a video to demonstrate a way to do that.  See here:


                            We made a video of Sheet Swapping and Legend/Filter Popping on a dashboard.


                            If you want to discuss it further, I recommend starting a fresh thread.  You limit your audience when you resurrect old threads.

                            1 of 2 people found this helpful
                            • 11. Re: Show/Hide Filters Based On Sheet Selection
                              sumit sinha

                              Hello Jonathan!


                              I am facing a similar issue. On my dashboard I am swapping sheets from 5 different data sources and my date selector is a parameter, I am having 5 different parameters, one for all sheet. My initial parameter helps me to choose which sheet I want to see and for every sheet displayed I have a date parameter for further visualization, but my all parameters remain there only irrespective of sheet selected. One option I have is to put a blank sheet over other four date parameters and display only one, the one relevant for that sheet, this can be done for every sheet but in the end the dashboard won't look good. Is there a way you can think where we can hide and show all the date parameters at the same location on the dashboard. I was trying to do it via using vertical floating box and popping blank sheet but no luck in it.


                              Thanks, Sumit

                              • 12. Re: Show/Hide Filters Based On Sheet Selection
                                Jonathan Drummey

                                Why are you using 5 different data parameters? Why not just use a single date parameter that controls all the data sources (while showing one worksheet at a time)?



                                • 13. Re: Show/Hide Filters Based On Sheet Selection
                                  sumit sinha



                                  In one dashboard I am showing 5 different charts, hiding unhiding based on option selected in a parameter. 1st contains 15min data, 2nd hourly data, 3rd daily, weekly hence monthly. All correspond to different date stamp. For 15min data I am showing values for last 2 days, for hourly 7 days, for daily 30 days and so on. They all come from 5 different sql tables, because of performance issue they come from separate table. I am passing a parameter where the user can select a date and for 15min they will see previous 2 days data, for hourly they will see 7 days data and so on. All these date parameter are separate for all these charts. So on dashboard I want all 5 date parameter to appear because on that basis only the user can select a date.


                                  Thanks, Sumit

                                  • 14. Re: Show/Hide Filters Based On Sheet Selection
                                    Jonathan Drummey

                                    You could probably do something like the technique that Joe Oppelt and Matt Lutton demonstrated in Re: Show/Hide Filters Based On Sheet Selection. There would be a vertical layout container that would have 5 horizontal layout containers in it, each horizontal layout container would have one "popping" worksheet (that would only appear when the correct worksheet was chosen by your 6th parameter) as well as the appropriate parameter. Worksheets that are hidden in this way do take up a few pixels, so the different parameters would appear in slightly different locations.

                                    1 2 3 Previous Next