Forum Discussion
Row Level Security for Regional, General and User levels
- 2 years ago
Anonymous All three links work for me. This is all going to depend on your data, which is why I was asking for how your data looks. You can have 1 or more tables it just depends on what information you have in your fact table and how you are forming the relationships. I have implemented a very basic model using 3 user tables and a single fact table. You can view as another user by going to Model, View As and then selecting a role such as RD and also check the box for "Other user" and type in "[email protected]" for example. Then you only see Region1 data. If you select GM role and "[email protected]" then you only see Site1 data. Also works at a user level. But, again, this all depends on your data and your relationships. See PBIX attached below signature.
Anonymous Very difficult to answer this without knowing anything about your data. This might help: Dynamic Hierarchical Row Level Security - Microsoft Fabric Community
Otherwise, Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
- Anonymous2 years agoNot applicable
Hi Greg_Deckler ,
Thanks for replying. The blog for the post you attached is broken.
My desired output is that the security meets the following rules :If USERPRINCIPLE = email from RD table then show the corresponding regions data
If USERPRINCIPLE = email from GM table then show the corresponding sites
If USERPRINCIPLE doesn't = email from either of these tables then show the corresponding user data
I can bring in any data related to the managers and users, I'm just looking for the best practice in setting this up as most examples are with a single role and not multiple roles.I'm not sure whether I can achieve this with a single table with all of the fields or whether it is better to have separate tables for the regional, general and users. I'm also not sure of how to write out the Dax to achieve this goal.
Thanks again
- Greg_Deckler2 years agoCommunity Champion
Anonymous All three links work for me. This is all going to depend on your data, which is why I was asking for how your data looks. You can have 1 or more tables it just depends on what information you have in your fact table and how you are forming the relationships. I have implemented a very basic model using 3 user tables and a single fact table. You can view as another user by going to Model, View As and then selecting a role such as RD and also check the box for "Other user" and type in "[email protected]" for example. Then you only see Region1 data. If you select GM role and "[email protected]" then you only see Site1 data. Also works at a user level. But, again, this all depends on your data and your relationships. See PBIX attached below signature.