Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Hi @stevenvd
Please refer to these documents first.
If you have any problem to implement in your scenario, please let me know.
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
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
99 | |
92 | |
50 | |
49 | |
46 |