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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

implementing dynamic row level security

Want to create a table with 200 employees to display the salary of employee and each employee can see their salary only not others using dynamic row level security 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

I created some data:

Salary:

vyangliumsft_0-1635403758377.png

Email:

vyangliumsft_1-1635403758382.png

Here are the steps you can follow:

Create a Role in Power BI Desktop and use the USERPRINCIPALNAME() function to achieve dynamic row-level security

Model – Manage roles – Create Role – Select the table with Email – Create Dax expression

vyangliumsft_2-1635403758385.png

Publish it to Power BI Service, select the data set of this report, and click Security.

vyangliumsft_3-1635403758389.png

Enter the Row-Level Security interface and add everyone's email (you can also create a group and add everyone to this group, which is more convenient for management)

vyangliumsft_4-1635403758390.png

After setting it up, you can share its report with others, and everyone can only see the information they specify.

https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-share-dashboards

 

Note here:

The user you share the report with must be in the role of View in the workspace, otherwise RLS will fail.

vyangliumsft_5-1635403758391.png

This is a link about RLS content:https://addendanalytics.com/dynamic-rls-in-power-bi/

https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple

https://community.powerbi.com/t5/Community-Blog/Dynamic-Row-Level-Security-Dynamic-RLS/ba-p/787399

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @Anonymous ,

I created some data:

Salary:

vyangliumsft_0-1635403758377.png

Email:

vyangliumsft_1-1635403758382.png

Here are the steps you can follow:

Create a Role in Power BI Desktop and use the USERPRINCIPALNAME() function to achieve dynamic row-level security

Model – Manage roles – Create Role – Select the table with Email – Create Dax expression

vyangliumsft_2-1635403758385.png

Publish it to Power BI Service, select the data set of this report, and click Security.

vyangliumsft_3-1635403758389.png

Enter the Row-Level Security interface and add everyone's email (you can also create a group and add everyone to this group, which is more convenient for management)

vyangliumsft_4-1635403758390.png

After setting it up, you can share its report with others, and everyone can only see the information they specify.

https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-share-dashboards

 

Note here:

The user you share the report with must be in the role of View in the workspace, otherwise RLS will fail.

vyangliumsft_5-1635403758391.png

This is a link about RLS content:https://addendanalytics.com/dynamic-rls-in-power-bi/

https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple

https://community.powerbi.com/t5/Community-Blog/Dynamic-Row-Level-Security-Dynamic-RLS/ba-p/787399

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@Anonymous , You need secure salary table, it should be with a table(or it should have), has email , that is filtered using RLS

 

refer how to use

How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk

 

refer: https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.