Forum Discussion
DAX and RLS using a "security role" table
- 8 years ago
Hi lfrancfort,
According to your description above, you should be able to simply create a role with the following DAX formula without creating any other calculate columns to implement the RLS in your scenario. What you need to do is creating properly relationships among your tables. For more details you can refer to this article. :smileyhappy:
UsersAndCompanies[UserName] = USERNAME ()
Regards
Hi v-ljerr-msft,
You were right, my issue was related to relationships : there was a many to many relation between both tables on the CompanyID field (same company in several locations, and same company with several users linked to it). I created a Companies table, with a one to many relation with CompaniesAndLocations and UsersAndCompanies, and RLS worked fine with your simple formula.
Thank you
Hi lfrancfort,
Great to hear the problem got resolved! Could you accept your reply above as solution to close this thread? :smileyhappy:
Regards