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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Frequent Visitor

RLS or Modeling for user role based on dual condition

Hello Everyone,

I have 2 data sets, User and dealers under them & another one is Opportunities data where I have leads data from buyers from different countries. Both the tables are modeled based on dealer id.


The user in above data have different roles, my requirement now is for just role 3 user id's, they should see only Opportunities of their respective coutry and for rest of the role they can see all countries data. But with my current modeling they are able to see all data based on dealer id  modeling.

Example:  user id 3  has access to OpportunityId 4 & 5 but he should see only OpportunityId 5 since his country is US.

Similary User id 5 should see only OpportunityId 6 & not 8.

But for a super user like say User id 1 he should see both OpportunityId 1 & 2 which is of CA and US.

Could any one help me with how to acheive this based on current modeling and role based user's country as well.

Frequent Visitor

@v-kkf-msft , In my case RLS is based on User id, each user has set of dealers under them and also each user has a role defined to them. Above case will not fit perfectly to my scenario and also you have used static role number, what if user other than role 3 will login? It has to be completely dynamic based on avaiable role and user id.

Community Support
Community Support

Hi @Senthil_Kumar ,


First create a relationship between [Dealer id].




Then create the following filters for role 3.


[User role] = 3 
    COUNTROWS ( Opportunities ),
        SUMMARIZE (
            Opportunities[Dealer id],
        SUMMARIZE (
            FILTER ( User_Dealer, User_Dealer[User role] = 3 ),
            User_Dealer[Dealer id],
            User_Dealer[User Country]
) > 0






If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



Super User
Super User

Sounds like you need a composite key "Dealer-Country"  in both tables.

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.


Fabric certifications survey

Certification feedback opportunity for the community.