Skip to content

Row Level Security

How to set Row Level Security (RLS) in Power BI

  1. Add a Table specifically for security. One column should match another column in the data set you want to filter on, the next column should be the Microsoft username, so that the RLS can be applied on the user's account.

    Note: The filter can only be applied to people who are set as viewer only by the administrator.

  2. Go to Data Model and set the security. Click on Manage Roles then name the role, select the Security Table Username and set that equal to DAX USERNAME().

  3. Edit the Relationship of the SecurityTable. Make sure you click Apply security in both directions.
  4. To test the filter - Click View As and enter a Username next to Other user. Make sure Other user AND MsftSecurity are both checked mark.
  5. Once you publish, you need to set the security on PowerBI service. On PowerBI Service, click on the dots next to Dataset, then select Security.
  6. Add the usernames to MsftSecurity. Check to make sure this works.

Note: Unless the users are view only, they will be able to see the entire dataset. (i.e., RLS will not work)