How to Set Default Value While Setting Row-level Security for Each User

Published: 07 Apr 2023
Last Modified Date: 07 Apr 2023


How to set default value while setting row-level security for each user?


  • Tableau Desktop 
  • Tableau Server
  • Tableau Cloud


The following is an example of setting up a User Filter for Region and setting a default value for the Region parameter.

Option 1

1. Create a parameter and name it Region.
 User-added image
2. Right-click Region and select Show Parameter.
3. Create a calculated field and name it !Region.

IF [Region]=[Parameters].[Region] THEN [Region] END
4. Create a calculated field and name it !State/Province.
IF [Region]=[Parameters].[Region] THEN [State/Province] END
5. Assign Geographic Role “State/Province” to !State/Province.
6. Assign Geographic Role “Create from>!State/Province” to !Region.
7. Double-click Longitude and Latitude.
8. Add !Region and !State/Province to Detail.
9. Add SUM(Profit) to Color.
10. Select Menu>Server>Create User Filter>Region, and sign in to your Tableau Server or Tableau Cloud.
11. Create User Filter and name it !Region User Filter.
 Note: For more information about User Filter, please refer to Create a user filter and map users to values manually.
 User-added image
12. Create a calculated field and name it !Default Region.
WHEN "user1" THEN "East"
WHEN "user2" THEN "Central"
WHEN "user3" THEN "West"
WHEN "user4" THEN "South"
ELSE “East”
13. Create a calculated field and name it !Region list for parameter.
IF [!Region User Filter] THEN [Region] END
14. Right-click Region parameter and select Edit. Configure it as follows:
 User-added image

Option 2
You can use Custom Views to save your default value without changing the original view.
Create a Custom View
Did this article resolve the issue?