Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Aroth
Advocate II
Advocate II

RLS need some advice

Hi everyone, 

I just get the Pro licence of PBI and I have some questions about the RLS.
I'm creating a report that will be shared to a large group of people. Everyone will have custom access to the report according to their Role in the company. That mean that I will have to create lots of different RLS (could be around 30 ) .
Could this harm the Report efficiency ? 

 

I've noticed that the RLS is not very flexible. I tried to restrain a user to a role I created in order to test it. Then I removed the user from this role on the security list so he could see the full report again but he is now unalble to see the report.
I tried to create a Role with no filter that would be the "global role" but it didn't work. 
Has someone an idea how I should do it ? 

If you have some advice or helpful tips please don't hesitate to share them.

Thanks,
Aroth

2 REPLIES 2
v-sihou-msft
Employee
Employee

@Aroth

 

In this scenario, if you want to configure Row Level Security based on incoming users' role in company. You don't have to create one RLS for each role. I assume you should have a UserInfo table which contains the role information of each person. You just need to use LOOKUPVALUE() to get the [Role] column based on USERNAME() in row level filter.

 

[Role]=LOOKUPVALUE(User[Role],User[Name],USERNAME())

When you share a dashboard with RLS applied, the end users must be within a role. Otherwise they can't access the dashboard. Or you can also grant the Group admin to users, then the RLS will not apply on them.

 

 

As I tested, if I create a role with no filter, the member of this role can view all data.

 

Regards,

Hi @v-sihou-msft, thanks for the advise

As I'm trying to follow your recommandation I have few more questions...

Just to explain the context:  the users are sales leaders that have a team with "sales person". So I want each sales leader to see their team. It means that the "Role" of the users are their Name because I created an other mapping table with the Name of the leader > each member of the team >  account ownership;

For Example , I have those three tab with the relationship :
EXAMPLE.PNG

 

So I tried two RLS formula :

[Role]=LOOKUPVALUE(ROLE[Role],ROLE[User],USERNAME())

 

[Role]=LOOKUPVALUE(ROLE[Role],'ACCOUNT OWNERSHIP'[Sales Leader],USERNAME())

But they didn't works...

It would be great if you know where the problem is.....

Thanks a lot !!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.