Not everyone is a Tableau guru, at least not yet. To help Tableau rookies, we’re starting from square one with the Tableau Essentials blog series. The series is intended to be an easy-to-read reference on the basics of using Tableau Software, particularly Tableau Desktop. Since there are so many cool features to cover in Tableau, the series will include several different posts.
In today’s article, we’ll examine User Functions that you can use as part of the Create Calculated Field tool. To access this window, right-click on either the Measure or Dimension window and select Create Calculated Field. Then, select User from the function drop-down menu.
The user functions allows you to create filters based on your data source and reference the identity, domain, and membership of the current user on Tableau Server or Tableau Online. Let’s now examine the different types of User Functions:
The FULLNAME function will return the full name for the current user. This is the Tableau Server or Tableau Online name when the user is signed in. Barring that, it is the local or network full name for the Tableau Desktop user. Here’s an example:
This function returns true if the user’s full name matches the specified string or false if it does not match. Here’s an example:
The IsMemberOf function returns true if the logged-in person currently using Tableau is a member of the group that matches the string. If the person is not signed in, then it returns false. Here’s an example:
Another true/false test, the IsUserName function will return true if the logged-in user’s username matches the string. Here’s an example:
This function returns the domain for the current user when the user is signed into Tableau Server. It will return the Windows domain if the Tableau user is on a domain. The function will return a null string otherwise. Here’s an example:
The Username function will return the username of the current user. This is the Tableau Server or Tableau Online username if the user is signed in. If the user is not signed in, then it is the local or network username for the Tableau Desktop user. Here’s an example:
That concludes the user functions. These are great for creating customized views on Tableau Server/Tableau Online by using these functions as filters to limit what the user can see based on their username or domain. It’s another feature of Tableau Software that creates a tremendous amount of flexibility and utility.
Calculated fields can add a whole new layer of insight to your Tableau dashboards. The possibilities are practically endless, but we’ll be covering the fundamentals, especially functions, to help you build a foundational understanding of how and when to use them. Check back for more posts covering:
- Logical Functions
- Number Functions
- Date Functions
- String Functions
- Type Conversion
- Aggregate Functions
- User Functions
Another great resource for functions is Dan Murray’s best-selling guidebook, “Tableau Your Data!” It features a whole section devoted the functions we’ll be covering in this series and much, much more.
More Tableau Essentials
Want to learn more about Tableau? We have several posts outlining all of Tableau’s fantastic features. Check out the full list on our Tableau Essentials blog channel.
As always, let us know if you have any questions or comments about this post or Tableau in general. If you’re looking for personalized training or help with something bigger, contact us directly!