Tableau Server: Set Dynamic Row-Level Filters

by Skomantas Tamulaitis

There are 2 main stages at which content permissions can be set on Tableau Server: 1. Project; 2. Row-level. The most appropriate option will depend on how much overlap there is between users interacting with the content. Today I will focus on the latter, row-level permissions.

Row-level permissions can be further divided into manual user filters and dynamic ones. If you are interested in manual user filters make sure to read this blog by my fellow Data Schooler Fergus Alexander Smith: https://www.thedataschool.co.uk/fergus-smith/how-to-apply-user-filter-for-tableau

The main difference between the two options is that manual user filters hard code the permissions. It means that every time you want to add or remove a user from the filter, you have to do it manually. Dynamic user filters, on the other hand, rely on Tableau built in user functions. Using these functions you can create a filter that checks user credentials and compares it against Tableau Server groups or other connected tables. Here is an example:

Here we have the Sales Superstore data set

Within this data set we have Region field. What if we want managers to see only the data related to the regions they are responsible for? If we have another data table containing information about each manager and the region they are responsible for, we can connect those tables and use a user function to filter the view. Here is the manager table where managers’ usernames are associated with a region.

Now let’s join these tables together.

Let’s create a calculated field utilizing “USERNAME ()” function.

Now you can drag this calculated field onto filters card and select “True” (or click "False" and select "Exclude"). You can also add it to the data source filters. What will happen next is when the manager views the dashboard the filter will check their Tableau Server credentials and only show the data associated with their region. Importantly, this filtering option will only work if the user is signed in to their Tableau Server account.

Avatar

Skomantas Tamulaitis