2 Replies Latest reply on Mar 7, 2012 9:03 AM by janforsberg1

    Filter user access based on database

      I want to filter data based on a database table's entries rather than the User Filter in Tableau. I have a database with the user's AD login in one field and the schools/grades they have rights to view. (We are a K-12 school district). This is easy to maintain and works well for my SQL Server Reports. I am hoping to include the same functionality in Tableau.


      Example: the report has quick filters for school and grade. I want the quick filters to be restricted to relevant values based on the entires in the database table for the user.


      Any thoughts?

        • 1. Re: Filter user access based on database
          Robert Morton

          Hi Jan,


          You can define a calculated field which compares the current user to the field containing the AD login. By filtering on that calculation to only include 'true', you ensure that the rest of the data and filters will only show data for the user currently viewing the viz on Server. Since quick filters can be configured to show "Relevant Values" or "All Values", you'll need to ensure that they are only showing the relevant values to avoid exposing information in the quick filter itself which users should not see. Another approach is to make your user filter a context filter, which ensures that all other filters and queries are evaluated in the context of having first evaluated your user filter.


          Does this help?


          2 of 2 people found this helpful
          • 2. Re: Filter user access based on database

            What would be the syntax for creating the calculated field? The field containing the AD login is UniqueID. How do I reference the current user? This sounds exactly like what I need.