Forum Discussion
Dynamic Row Level Security for organizational hierarchy in Direct Query mode
Hello All,
I need some help with trying to figure out some dynamic row level security for a reporting I'm trying to create in Direct Query mode. I've seen many articles on how to solve an organizational hierarchy dynamic row level security in Import Mode, but not for Direct Query because you can't use the PATH() function.
What I'm trying to accomplish is when a manager views the report they only see their hierarchy within the company. For example, if a supervisor has two managers that report to him and those managers each have two employees that report to them directly, I want the supervisor to be able to see the whole hierarchy. As of right now, I can only get it to where the supervisor can only see data from the two managers that directly report to him and not the employee that report to those managers.
Has anyone found a way to make this work in Direct Query mode?
Thanks,
2 Replies
- v-xicai
Community Support
Hi nleuck ,
Currently, the RLS supports the DirectQuery mode, see more: https://docs.microsoft.com/en-us/power-bi/service-admin-rls.
You may set Row-Level Security (RLS) to manage roles, please see the link Power BI Desktop Dynamic security cheat sheet, which described the detailed steps. Maybe it doesn't work, there are some tips to let it work and test it efficiently.
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- nleuck
Post Patron
Hello v-xicai ,
I'm having an issue with editing the relationship. I'm trying to create a relationship from my Managers (similar to Groups in the example you provided) and Employee/Manager (similar to UserGroup). But when I do this it defaults to a Many to Many cardinality. When I try and change it to One to Many or Many to One I get a cardinality error.
Any thoughts?
Thanks,