1 Reply Latest reply on Jan 13, 2016 1:50 PM by Esther Aller

    Automatic User Filter

    cignior

      Hello,

       

      I followed the direction listed here User Filters and Row Level Security | Tableau Software because this is the end result that I'd like - For example, if one of my users logs in he/she can only see what he/she is designated to see. We maintain usernames and assign them each to a group in Tableau Online. I feel like adding the usernames of all of my users in a separate Excel file to join them to my data is redundant if they are already listed in Tableau Online with the correct groups. Every time an employee leaves the company and a new employee joins, I would have to both edit the Tableau Online users/groups and the file to join to my data. Is there a way to create a formula within Tableau that states - if Username is associated with this group only show this region/territory?

       

      Please see my user filter screenshot:

       

      Capture34.PNG

        • 1. Re: Automatic User Filter
          Esther Aller

          Hi Cignior,

           

          One possible solution would be to create a calculated field using the function ISMEMBEROF() to filter the view rather than using a user filter. An example filter might be:

           

          1. Create a calculated field with a name like "Group Territory Filter" with a calculation similar to the following:

            ISMEMBEROF("Group 1")
            AND ( [Territory Field] = "Albany"
            OR [Territory Field] = "Boston North" )
            OR
            ISMEMBEROF("Group 2")
            AND ( [Territory Field] = "San Francisco"
            OR [Territory Field] = "Seattle" )

            The above calculated field will return TRUE if the user is a member of Group 1 and the data is associated with Albany or Boston North, or if the user is a member of Group 2 and the data is associated with San Francisco.

          2. Drag [Group Filter] to the Filters shelf
          3. In the Filter dialog, check True and click OK

           

          User Functions has more information about what user functions are available and how they work.

          I hope this answers your question!