Forum Discussion

knikolova's avatar
knikolova
Frequent Visitor
2 years ago
Solved

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:

 

 

 

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

[RVP Email] = USERPRINCIPALNAME() but it's not working.
 
Can someone help please:)
  • 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!!

     

     

2 Replies

  • 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!!