d
WE ARE EXPERTS IN TECHNOLOGY

Let’s Work Together

n

StatusNeo

User Functions in Tableau | Row Level Security

tableau-logo - CloudMyBiz

What are User Functions in Tableau?

User Functions are used to create user filters and row-level security filters. These User Functions are responsible for giving or revoking Server side users from special privileges.

Here are the User Functions in Tableau

What are some user functions available in Tableau?

Consider we have Sample SuperStore dataset where we want to apply the User functions. Below are the sample statistics that we are focussing on just to explain how these functions are used. We have found the sum of sales on the basis of region and category.

  1. FULLNAME: This function will return the full name of the desired user. When we use this as a filter, we can use a calculated field to create a user filter that only shows relevant data to the person that is signed in to the server.

Syntax in Tableau:

FULLNAME()

Implementation:

If we want to show the specific data to a specific user only, then this will help to achieve the same. Here we have created a calculated field Full Name. Now, if we drag this calculated field into the filter and set it TRUE then only the respective server user can see his own region’s data.

Creating Calculated field
Here a specific User can see his specific region’s data only

2. ISFULLNAME: This function will return a boolean value of True or False. When we use this function and specify a full name in the argument, the function will return true if the name specified and the user’s name match and False if they do not.

Syntax in Tableau:

ISFULLNAME(string)

3. USERNAME: This function will return the username of the current user which will be the username in the Tableau Server or Tableau Online when the user is signed in. If not signed in, the username will be the local username for the Tableau Desktop user.

Syntax in Tableau:

USERNAME()

This function is similar to what we have used for FULLNAME(), but the only difference is that here we have to use EMAIL ID of that user instead of his full name. As you can see in the implementation.

Implementation:

Creating the Calculated field for USERNAME()

4. ISMEMBEROF: TThis function will return a boolean value. It will return True if the person who is currently using Tableau is a member of a group that matches the given string. The function will return a value only if the user is signed in to Tableau Server or Tableau Online otherwise the function will return NULL.

Syntax in Tableau:

ISMEMBEROF(string)

Implementation:

Here are the Groups we have in our Tableau Server
Specifying the Data Visibility for particular Group

5. USERDOMAIN: This function will return the domain for the current user when signed in to Tableau Server, it will return the windows domain if the user of Tableau Desktop is on the domain otherwise the function will return a “null string”

Syntax in Tableau:

USERDOMAIN()
The calculated field “Domain”

6. ISUSERNAME: This function will return a boolean value. It will return True if the specified username matches the current user’s username and false if it does not. This function will use the username of Tableau Server or Tableau Online when the user has signed in otherwise the username is from Tableau Desktop user.

Syntax in Tableau:

ISUSERNAME(string)

Here is our full article on User functions in Tableau, you must try them on your Tableau desktop, and do share your queries in the comment section below. Also, you can read more details here https://help.tableau.com/current/pro/desktop/en-us/functions_functions_user.htm.

I am a Data Engineer and Analyst working for 5 years in different domains starting from Healthcare, Recruitment, HR, and now Operations. During my voyage, I have worked in Pyspark, SQL, Tableau, Python, ETL, and AWS cloud services.

Add Comment