Forum Discussion
After RLS applied , user are not able to saw the data in report
Now data is visible but ranks are missing, ex: under the manager 10 employees, currently showing 1/1 ut actual result is 4/10, means RLS it won't take remaing employees ranks under manager. Please help me
Hi, Anonymous
I create a sample table:
Next, configure RLS, create a role named Manager-ID2, and set its ManagerID=2
Once configured, you can view the report with this role, here is my preview:
Before
Arfter
The next step is to publish to the Power BI service, as ibarrau said, and then go to the security settings of the semantic model and add the user to the appropriate role.
You can learn more about RLS from the following links:
Implement row-level security - Training | Microsoft Learn
Row-level security (RLS) with Power BI - Microsoft Fabric | Microsoft Learn
Row-level security (RLS) guidance in Power BI Desktop - Power BI | Microsoft Learn
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous2 years agoNot applicable
Thank you for your steps, But my actually problem is when after applied RLS ranks are not working properly, example in 1 team manager under 10 employee, based on performance ranks are given ex: employee "SACHIN" rank is 4/10, but sachin logged and checking rank is 1/1, this is wrong rank, before applied RLS shows 4/10- correctly, After applied RLS 1/1, how to achieve correct rank
- Anonymous2 years agoNot applicable
Hi, Anonymous
I'm sorry I didn't understand what you meant. Your problem may be with the measure of your ranking
I create another sample table:
Then create a calculated column, try the following DAX:
RankColumn = RANKX('Table','Table'[Performance],,DESC,Dense)When you select ManagerID, the rank will not change:
Create a new RLS role and observe with that role:
You can't use measure to rank because with RLS, it already filters out the rest of the data for you. It's equivalent to saying that your underlying data source "went from 10 employees ranked" to "ranked from 3 employees who belonged to manager ID 102". So you need to use calculated columns to fix the ranking.
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- pallavi_r2 years ago
Super User
Hi Anonymous ,
I can understand why this problem appears. Please tell me whether you are using static RLS or Dynamic RLS.
What happens in RLS, it shows data as per the restrictions applied to the user. The context is always on the data specific to RLS for user. so comparative analysis, bench marking and performance will not work. There is a solution, if you are using dynamic rls. In dynamic RLS, create another table with rank details independent of existing table without any linkage to existing table. I have implemented these kind of benchmarking / performance analysis in power bi with RLS applied.
If you can share more details on rls and modelling, I can help you further with performance.
Thanks,
Pallavi