Forum Discussion
Role Level Security on Multiple Tables
- 9 years ago
I believe we were overthing this. I accidentally posted this same question twice, but the solution is on the other one. I simply put a filter on the sales table for the Employee ID and Location Code.
You can still use the bridge table concept, the key it to ensure that you have the combination of all the users and countries that exist in your data set.
Remove the BI directional joins and instead use the following code against the user table and country table under manage roles:
User:
CONTAINS (
FILTER ( SecurityBridge, [User] = USERNAME () || [Country] = "US" ),
'SecurityBridge'[User], 'User'[User]
)
Country
CONTAINS (
FILTER ( SecurityBridge, [User] = USERNAME () || [Country] = "US" ),
'SecurityBridge'[Country], Country[Country]
)
This will filter the bridge table for a list of user that are either in the country or is that actual user. You can then filter the user table appropriately and do the samething for the country table. This should give you the correct combinations.
Let me know how you get on.
I have created an example using the data you supplied below. Row Level Security Example
- ggipson9 years agoFrequent Visitor
I believe we were overthing this. I accidentally posted this same question twice, but the solution is on the other one. I simply put a filter on the sales table for the Employee ID and Location Code.
- rjobaan3 years agoFrequent Visitor
Hi OpenDataLab,
I opened your pbix file and viewed as John Doe , and i adjusted the filter from || to && and In security bridge table i removed canada for Joihn Doe. So i expected to see only US sales..but i still can see everythin? how come? Do I need to send some settings or so?