-
1. Re: Dynamically show/hide dimensions from Quick Filter selection
Robin Kennedy Sep 10, 2012 5:20 AM (in response to thierryjakircevic)1 of 1 people found this helpfulWhen you use a filter in Tableau, it doesn't just hide the data, it completely removes it from your underlying source view, so Tableau has no way of knowing that the sum of all your records should be the unfiltered total because the data it isn't there anymore.
The only way I can think of accomplishing what you want is to create a duplicated datasource (right click your source and select duplicate) and then create a calculated field in your primary data source that divides the primary total by the secondary total - e.g. SUM([Number of Records]) / SUM([Duplicate].[Number of Records]). Then use this calculated field in your table, rather than the % of total table calculation from the first source.
Remember to remove any relationships that Tableau automatically adds in (Data -> Edit Relationships) otherwise you'll still be filtering on the secondary source too.
Hope that helps,
Robin.
-
2. Re: Dynamically show/hide dimensions from Quick Filter selection
Andrew Watson Sep 10, 2012 2:47 PM (in response to thierryjakircevic)I think you can do what you want, you need to create a table calc and use that as the filter. I'm assuming your brand dimension is called Brand. Create a table calc such as LOOKUP(ATTR([Brand]),0) and create a quickfilter from this. Leaving the Brand dimension on your chart and do the % of total table calc as usual. the only difference is the table calc becomes the quick filter. That should enable the user to filter without changing the %s.
Andrew
-
3. Re: Dynamically show/hide dimensions from Quick Filter selection
thierryjakircevic Sep 10, 2012 10:08 PM (in response to Andrew Watson)Thank you both for your help.
Andrew, it worked perfectly! Can't believe it was so easy! Great!
Thierry
-
4. Re: Dynamically show/hide dimensions from Quick Filter selection
thierryjakircevic Sep 10, 2012 10:58 PM (in response to Andrew Watson)Hi Andrew. I got carried over by my excitement and answered the post a bit too quickly
It works well individually for each sheet but I can't seem to make it work as a Global Filter. I have 5 different views that would need to use the same method.
Is there a workaround?
Thank you
Thierry
-
5. Re: Dynamically show/hide dimensions from Quick Filter selection
Andrew Watson Sep 11, 2012 1:48 AM (in response to thierryjakircevic)Hi Thierry
Until you mentioned it I also didn't know these filters couldn't be made global. I also can't think of a workaround for this. Maybe it's a good idea to start a new thread titled something like 'Problem using Table Calc as a late filter' as that should attract the attention of the master Tableau developers out there who are likely to have hit this issue in the past.
Good luck, I'm interested to hear how this one works out.
Andrew
-
6. Re: Dynamically show/hide dimensions from Quick Filter selection
thierryjakircevic Sep 11, 2012 2:13 AM (in response to Andrew Watson)Thank you Andrew. I have posted my question here: http://community.tableau.com/thread/120002
Hopefully, someone will find a workaround. Love the way your solution works (quick and simple) and really hope I can make use of it in my dashboards!