1 of 1 people found this helpful
If you add the user filter as a data source filter and then publish the data source, users will not be able to see or bypass the user filter using either Web Edit or Tableau Desktop.
In addition to Zach's great answer, if you are using SQL Server and a live connection, there is the possibility of leveraging the database row-level permissions by using Impersonate when publishing. This way, the database permissions are the one controlling what data is seen by the user.
Thanks for your response.
This is how my current solution works. I have at the workbook level a calculated field called AD groups filter:
then [Regional Manager Ntid]
then [Rep Ntid]
This field is used to filter the data source.
When I asked my dev to add this field to the data source, it did not filter properly. The rationale was that ISMEMBEROF will only work if its on the workbook calculation.
Can you elaborate on what you mean by add the user filter to the data source filter so that it cannot be bypassed? Does it still apply given these additional details I have provided?
Thanks for adding that option Dan, we use both methods depending on where our data is stored. We recently discovered that SQL Server impersonation doesn't work through Tableau Bridge so can't be used with Tableau Online, only with Tableau Server.
You can use both USERNAME() and ISMEMBEROF() in data source filters for published data sources. There is a general limitation that ISMEMBEROF('group name here') requires a string literal, it can't be a calculated field based on the data, but I don't think that blocks your use.
Load your unfiltered data source into Tableau Desktop. Create a filter from one of your fields in your data source, e.g. Condition: [Sales Rep]=USERNAME() OR ISMEMBEROF('Sales Managers'). Promote that to a data source filter by selecting the data source, choosing Edit Data Source Filters, and hitting OK to bring in your filter which will disappear from the shelf. Publish that data source to Tableau Server. You can then connect to it from within Tableau Desktop and simulate what other users will see by changing the Filter as User in the lower right.
Below links might be helpful for you.
In case it helped, you can mark it answered.
OK I'm with you - the current solution uses the calculated field as a data source filter. End-users are able to Delete that calculated field though and this as a result deletes it from the data source filter.
Any ideas on tackling this part of the problem?
End users will not see the details behind your published data source - that calculation is embedded in the data source and invisible to all users connecting to it. See my original reply.
I have tried this with the conditional calculation and yes, the user cannot see the filter, but they can delete the calculation or change it unfortunately.
If I use a dimension that's part of the data model, that seems to work for me though.
I'll mark this is resolved.
Thanks for the help again.