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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
knikolova
Frequent Visitor

Modeling role issue

Need help, community.

 

I'm doing something wrong and I can't find what.

I want to set RLS based on the RVP email.

Here is what I have as relations:

 

knikolova_1-1717581702794.png

 

 

I'm adding this to the modeling role at User table level - 

[RVP Email] = USERPRINCIPALNAME() but it's not working.
 
Can someone help please:)
2 ACCEPTED SOLUTIONS
miTutorials
Super User
Super User

USERPRINCIPALNAME() returns the User ID and not email ID  - Please cross check the value returned by this function by creating a measure.

 

Refer to the video below incase you need to know how to setup RLS.

 

Create Row Level Security (RLS) to restrict access in PowerBI | MiTutorials (youtube.com)

View solution in original post

rajendraongole1
Super User
Super User

Hi @knikolova - you need to ensure that the relationships between your tables are correctly set up and the DAX expression for the RLS is properly applied.

 

Check the model and relationship:

Example : the sales table should have a relationship with the User table based on the RVP Email field.

 

In manage roles too Go to the Modeling tab and select Manage Roles.

Step1: Create a new role, like RLS_RVPE

Step2: Add a DAX filter to the user table: [RVP Email] = USERPRINCIPALNAME().

Check these basic steps and test it in power bi desktop itself by using view as a role. if the data is getting filtered based on the user email id or not.

 

Refer this video, implementing Dynamic RLS

Dynamic Row Level Security in Power BI (youtube.com)

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @knikolova - you need to ensure that the relationships between your tables are correctly set up and the DAX expression for the RLS is properly applied.

 

Check the model and relationship:

Example : the sales table should have a relationship with the User table based on the RVP Email field.

 

In manage roles too Go to the Modeling tab and select Manage Roles.

Step1: Create a new role, like RLS_RVPE

Step2: Add a DAX filter to the user table: [RVP Email] = USERPRINCIPALNAME().

Check these basic steps and test it in power bi desktop itself by using view as a role. if the data is getting filtered based on the user email id or not.

 

Refer this video, implementing Dynamic RLS

Dynamic Row Level Security in Power BI (youtube.com)

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





miTutorials
Super User
Super User

USERPRINCIPALNAME() returns the User ID and not email ID  - Please cross check the value returned by this function by creating a measure.

 

Refer to the video below incase you need to know how to setup RLS.

 

Create Row Level Security (RLS) to restrict access in PowerBI | MiTutorials (youtube.com)

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.