Forum Discussion

z-rising's avatar
z-rising
Frequent Visitor
2 years ago
Solved

Adding a restriction to RLS

I have a PBI desktop report I publish to service that uses RLS.

 

The current configuration has a table "RLS" that refreshes an excel file with the columns "Username:, Division", and "Email".  The table has a many to one cross-directional filter in both directions with security filters in both directions, connected to a table "Division" that has a single column "Division II" listing the 10 divisions of the company.  This table connects to both main data tables "Data 1" and Data 2" via a many to one single direction cross filter.

 

The RLS currently works correctly, using the DAX code  [Email] == USERPRINCIPALNAME() in a security role applied to the RLS table, so that when they log on to PBI service, it only allows them to view the data from divisions that are adjacent to their email in the RLS table (some users have access to more than one division, so they have a row int he RLS table for each division they have access to).

 

I have a request from the manager of the group to add an additional filter to restrict access to one account "Cost of Sales" for users who are in 4 of the divisions - "DivC" "DivD" "DivF" and "DivG".  In the Data 1 and Data 2 tables, the columns the account names are named "Account Name" and "Account Description" respectively.

 

I am trying to write a DAX code to add to the filter in Security Roles that will restrict users from those 4 divisions from seeing the account "Cost of Sales" but haven't been able to figure it out.

 

Please let me know if I can supply any additional information.

 

7 Replies