Author: Divyani Pardeshi
Row Level Security (RLS) in Tableau refers to restricting the rows of data a certain user can see in a given workbook or data source at the time they view the data. This allows you to better control what data users see in a published view based on their Tableau Server login account. Sometimes while creating reports, we come across a certain use case where we need to restrict access to data only to certain users. Consider a chain of hotels, and the analysis of each hotel's performance is to be shown only to the respective manager of the hotel. Tableau’s user filter functionality can be used to restrict data access in a more secure and personalized way to a wide range of users.
Consider the use case in our module “Travel Verse." Travel Verse provides an interface to users where they can plan their trips, get an analysis of all the top places, top travels, factors affecting travel, and dashboards depicting the travel history of a user. Already existing users can analyze their trip history and overall expense of the trip and can find recommendations of places based on their previous travel interests. Travel Verse has business with hotel owners of top hotel chains to whom it is providing analytics of their hotel chain. It covers all hotel KPIs, which gives performance insights into their hotels concerning their competitors.
To achieve this personalized user dashboard was created using a user filter functionality of Tableau Online.
● Tableau Desktop.
● Tableau Online.
Tableau Desktop is a data visualization tool that provides an intuitive drag-and-drop interface to access, analyze and visualize data. Tableau makes you analyze your data and make the best use of it to generate useful insights for your organization.
Tableau Online is a Tableau Server hosted on the cloud. It allows you to publish data sources, dashboards, and workbooks and keep them up-to-date. You can share your dashboards with other users. It allows you to create groups, add users to those groups, and use user filters on worksheets.
Steps to create a user filter:
● Login to Tableau online. Click users on the left button. In our use case, we created existing users and also created users as hotel owners. For travel users, we will show user travel dashboards, and for hotel users, we will show hotel dashboards of their hotel chain only. E.g., Novotel hotel users can see data from the Novotel chain of hotels only.
● Choose to add users via email and enter the email id of the users.
● Enter the site role for the desired user.
Site role signifies the maximum level of access a user can have on the site. For more information on site roles, you can refer to this link.
● Now, come to Tableau Desktop.
● Open a workbook or create one or set up a new connection to the data you want to filter.
● Navigate to the worksheet where you want to apply the filter.
● Select Server > Create User Filter from the top.
● If prompted to sign up in the server. Enter Tableau online credentials and log in to the server.
● Select the attribute of which the user filter is to be applied. For TravelVerse you are providing Customer id as the filter.
● Now Map the field to the user. Mapping user with customer id. For Eg. Divyani as a user is mapped to customer id 2. Now Divyani has access to data specific to customer id 2 only. In other words, we can also say that Divyani is an existing customer of Travel Verse with customer id as 2.
● Similarly, you can map users to customer ids and restrict the access of data to specific users only.
● Drag the filter to the filter section of all the required worksheets. Here we have renamed the filter set to Customer, and this is placed in the filter section of needed worksheets.
● Now the user filter is applied, and the User can only see the data on dashboards specific to customer id 2.
● Verify whether user filters are working properly or not. You can try to change the user from the bottom, as shown in the figure. You will notice that any other user than Divyani cannot view the data of customer id 2.
Where can a user filter be applied? User filters can be applied to all the worksheets but not to dashboards directly.
Using the above steps, one can apply a user filter and achieve a row-level access policy and restrict dashboard views to specific users.