Yes, you can change filters in embedded views. Check out the documentation for the syntax here:
Quick filters have an option to "Show All Values in the Database", "Show Relevant Values Only", and (if you are using a context), "Show Values in Context". Using the little drop down arrow on the quick filter in Desktop, you can set the default and even customize whether or not someone viewing the viz in Server can change the option.
If you select "Show Relevant Values Only", then any time another filter is applied, only options that are applicable will display.
Thanks for your quick reply!
Following your instructions (by selecting "Show Relevant Values Only", by deselecting "Show more/fewer button" and applying embed filter for the wanted dimention "Sources" values), I almost succeded to get the wanted quick filter layout in our web application (just two options visible in the view) immediatelly after initial page load :-) :
But, when I select one of the options in the quick filter on page, the layout of the quick filter is changed back to the "full version" :
It looks like the after this kind of postback the original embed filter
<param name="filter" value="Source=DM_OSS,DM_SF_EC" />
is not used any more in the quick filter layout.
Is it possible to keep the original quick filter layout (just two options visible) also after selecting one of the options?
Another question is either it is posible to have the checkboxes in the quick filter selected in the initial load? My feeling is that it would correspond better with the results, shown in the view.
What I suspect is happening is that you are using the same field to filter from the embed parameter and the quick filter. So initially, the quick filter shows only relevant values for the filter passed in the embed parameter. However, once it is changed, it is no longer constrained and thus shows all values (they are all now relevant).
If you want to universally constrain the quick filter you'll need to use another field as a filter that cannot be changed by the user from the interface. An easy test would be to duplicate the field you want to use as a filter (right click the field in desktop and select "Duplicate"). Rename it to something that will identify its use (e.g. Source_Embed_Filter). Then when you embed the view from server, use the parameter to filter Source_Embed_Filter while still showing Source as the relevant values only quick filter. The user won't be able to change what is filtered by Source_Embed_Filter and the Source quick filter will only ever show relevant values for what has been set for Source_Embed_Filter.
Thanks for your reply.
Your suspicions are correct: I am using the same field to filter the quick filter and the view itself.
I am afraid that the proposed solution is not appropriate in our case: we do not want to restrict quick filter in tableau desktop, but during access from the web application itself.
Some users in our application should be able to see all Sources and to use quick filters to filter on all these sources, other users are allowed to see just a few sources (and to use the quick filter to filter only these available for them sources).
Actually what I would like is to publish the complete view, that includes all sources, and with quick filter, containing all sources.
And then, during embedding the view into our web application, restrict the view and the quick filters to the ones, that are allowed for the logged in user.
1. User A is allowed to see all sources: so if this user is logged in, he would see the whole view and quick filters, containing all sources.
2. User B has access only to sources DM_OSS and DM_SF_EC. So, when this user is logged in, he would see filtered view (related to these sources) and the quick filter, containing only there two sources (so that the user B will not be able to get the forbidden sources by using the quick filter, but still would be able to make a sub-selection to see the results for just one source, for example).
The user authorization (what sources a logged in user allowed to see) is already built in our application.
By using embed filter I can restrict access to the view .
1 of 1 people found this helpful
Okay, I see! The great news is that Tableau has a way to do exactly what you want (and it's really easy!)
What you'll want to do is create a user filter. You can find out more here: http://onlinehelp.tableausoftware.com/current/pro/online/en-us/publish_userfilters.html
The short of it is that you'll be able to assign users to the sources that they are able to see as part of the definition of the workbook. You won't have to pass anything through embedding parameters (which aren't good for trying to enforce security -- I could intercept and change the parameter and see data I shouldn't). But user filters are very secure.
Also, from desktop, once you have defined the user filters, you can check to see what any given user will see on Server by changing the current user in the little drop down in the bottom status bar of your Tableau Desktop screen.
Hope that helps!
Thanks a lot for your responses!
After some discussions we decided to stick to your suggestion about duplicate dimensions when filtering views from the SQL database. It works perfect.
When using cube (analysis services), it looks impossible to duplicate dimensions (is it correct?) . So your second solution will be helpful in this case. Although we have to synchronise somehow the users in tableau and in our web application.
Thanks once more!