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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
stevenvd
Regular Visitor

Row Level Security

Hi,

 

I need to implement RLS based on usernames. A user can have access to 1 or more companies. There is a sales table that contains intercompany sales. A user is allowed to see the sales of his company but also what is bought from the company.

security, rls

In the example below we have user X who has access to company ABC. The transaction table contains a column for company and a column for intercompany. In the first record company ABC sells to QQQ, in the second record to NVA and in the third record ABC purchases from NVA.

 

ABC should see all 3 records but if I connect the company from security table with company from fact table only 2 records will be shown cause company in fact table is filtered for ABC. 

 

I cannot figure out how to implement the security. Any directions you could point me into are more than welcome. Maybe I need to use SQL to do some manipulation on the data... Don't know but will keep on trying to find a solution.

 

Capture.PNG

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @stevenvd 

Please refer to these documents first.

If you have any problem to implement in your scenario, please let me know.

RLS with Power BI

Row-Level Security in Power BI: Part 1 – Roles and Users

Dynamic RLS with manager level

 

To implement RLS based on usernames, you need a table which has user email and user name accordingly.

then relate this table with the "security" table. 

 

Best Regards

Maggie

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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