Forum Discussion
Not able to get RLS to work on a second table
Hoping someone can help me with row level security here. I have a budget table and a transactions table which are linked together in the data model. My budget table rls is working and is applied to org codes ("ORGN_CODE_KEY" & "ORGN_CODE_1")to allow users to see gross financials. The transaction table is an itemized listing by transaction record which still uses org codes ("ORGN_CODE").
I am following the steps Manage Roles > Right click by my transaction table > choose the "ORGN_CODE" option > select the applicable code "26500" and click save. All I get in return when I "view as role" is a blank screen, no error code or anything. Any ideas?
Ah, I see, so you should in best practise use the same security filter as in certain cases one will counter act the other. If you disable that security filter does this one work? What are you filtering on the other one?
- Anonymous8 years ago
Thanks for your assistance on this one. I deleted the relationship between the two tables and the RLS works well independently. You touched on what I believe to be the issue though, that is the RLS should use the same security filter or one will counter the other. In addition, if the tables do not need to be related then independent RLS is possible.
Thanks again!
12 Replies
- AnonymousNot applicable
Hi Anonymous
When you define RLS, you filter the table for 26500. Please make sure your visual has this value, if not Power BI is going to show a blank visual,So please confirm that part.
Thanks
Raj
- AnonymousNot applicable
Thank you for the response. I have added the ORGN_CODE column to my table visual and no luck. Still loads a blank page only. Here is my DAX expression: [ORGN_CODE] = "10100"
Here is what loads when viewing as role.
- AnonymousNot applicable
Are you sure [ORGN_CODE] has the value of 10100 ?
Another point to note is - If you apply the RLS in the master table, the crossfiltering will pass to the transaction table but the vice versa wont happen.
Thanks
Raj