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:
Now with the Product view selected, the Market has been pushed down by the Vertical spacer worksheet:
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.
hiding a quick filter.twbx 212.8 KB
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?
2 of 2 people found this helpful
There are three ways I can think of to do this:
- 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.
- 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
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..?
1 of 1 people found this helpful
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.
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??
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.
1 of 2 people found this helpful
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:
If you want to discuss it further, I recommend starting a fresh thread. You limit your audience when you resurrect old threads.
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.
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)?
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.
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.