In Tableau, the “User Filtering” aka “Row-level Security” is a feature that allows us to control the data that specific users or groups of users can see and interact with in a Tableau workbook or dashboard. It helps us to customize the data visibility and access based on user roles, departments, or any other relevant criteria. In my placement, I came across the use case like “we want our regional salesperson to only see the sales data for the territory with which they operate”. So these are the key takeaways after I learned the user filter myself, mainly reading the information lab blog posts and watching the YouTube tutorials.
1. We can only create the User Filter on the sheet, not on the dashboard.
2. After creating the User Filter for a particular field in the dashboard, we can then map the users.
For example, I can assign different Groups (DS cohorts here) or Users (myself here) to view different regions.
3. If there is no existing group that meets the filter criteria, we can then go to the server to create the new group and add users to it.
After creating the new group, we can go back to user filter in the tableau workbook to map the new group.
4. After this step, we will see a new user filter set appears in the data pane. We can then put it in the filter and the view will be filtered.
Because I map myself to all the regions, I can see all the data in Central, East, South and West. However, if I change the user group to be DS10 on the lower right corner, which only have the access to view the East region in the previous filter setting, now we can see the workbook is filtered for the specific user group.
Note: previewing is not available if the workbook connects to a published data source.
5. Sometimes, after we map a user or group to members, we might also want to map another user or group in the same way. We can copy and paste the settings in the User Filter dialog. So after we right click the user filter set and select edit set, we open the dialog box as shown below. Then, we select the user or group on which we want to paste settings from another user or group. Next, click Copy From, and select the user or group whose settings we want to copy.
This easy manual way of creating user filters, however, has some limitations. For example, there may be thousands of values in the Regions field; or there may be many levels of hierarchical roles in the company. In this case, a more complex way, which is merging the datasource with a security table is more efficient. Please read the blog post of the Information Lab to learn more about creating user filter with the security table Also, Tableau has a good documentation about Creating a User Filter and Securing It for Publishing