Forum Discussion
Dynamic RLS
- 6 years ago
Let the data model do the work. Link the tables, make sure the filter direction is pointing from accounts to transactions, and put the RLS on the accounts table with a simple formula:
[Emailid]=USERPRINCIPALNAME()
- 6 years ago
Let the data model do the work. Link the tables, make sure the filter direction is pointing from accounts to transactions, and put the RLS on the accounts table with a simple formula:
[Emailid]=USERPRINCIPALNAME()
There is no emailid field in accounta table, that is soo simple RLS, that doesn't work here.
we need to virtually filter the accounts table data based on user login. User email and his accounts are in table 2.
kindly give me a solution.
- mwegener6 years agoMost Valuable Professional
- Anonymous6 years agoNot applicable
Thank you Marcus, well in my scenario, i have already used apply security check box to another, so i cant use it here. Give me sometime, i will test again and i will post my data model picture.
- Anonymous6 years agoNot applicable
mwegener
here is my model.and this is the error i am getting if i try to apply security in both directions.
- Anonymous6 years agoNot applicable
sturlaws
yeah this is what something i am expecting.VAR _account_id = CALCULATETABLE ( VALUES ( 'table1'[account_d] ), FILTER ( 'table2','table2'[email] = USERPRINCIPALNAME () ) ) RETURN 'Table1'[account_id] IN _account_idwhere whould i use this DAX to filter? in table 1(fact) or table2(user table) ?