Forum Discussion
Dax required for RLS to view direct reportees
Hi Team,
Please help me with the dax expression for fetching the employee and his direct reports throught RLS
I have table called "employee table" with below columns
empid, name, managerid, supervisorid, ismanager/supervisor?
the last column has 1 if an employee is manager /supervisor and gives 0 when he is not.
how do i implement RLS with this
Hi LP280388 ,
You can use this dax to do the filter:
[empid] in CALCULATETABLE ( VALUES ( 'table'[empid] ), FILTER ( 'table', [supervisorid] = USERNAME () && [ismanager/supervisor] = 0 ) )Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- LP280388Resolver II
Please help me this is bit urgent
- v-chenwuz-msftCommunity Support
Hi LP280388 ,
You can use this dax to do the filter:
[empid] in CALCULATETABLE ( VALUES ( 'table'[empid] ), FILTER ( 'table', [supervisorid] = USERNAME () && [ismanager/supervisor] = 0 ) )Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- LP280388Resolver II
v-chenwuz-msft Thank you very much for this. How can I alter this Dax to make sure that the Manager's Manager will be able to see his subordinate's subordinate?