Forum Discussion
zq
9 years agoFrequent Visitor
Power BI Embedded Row-Level Security for Multiple values of single attribute
Hi all, I have embedded a power report with one role i.e. department_id. When a user accesses the report, the report is filtered according to the department_id to which he has access. This id is pass...
vinaypugalia
9 years agoResolver I
Hello,
What I see as a solution to your problem is -
1. Create a mapping table for Roles_Departments having columns - Role_Id & Department_Id.
2. As RLS, use the DAX - [Role_Id] = USERNAME()
3. From you C# code, pass Role_Id for USERNAME & not Department_Id
This way, if you develop a custom logic to find the right Role for the logged-in user, the data could easily be filtered by all the departments associated with that role.
Hope, this helps!
Thanks,
Vinay