Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Roles issues on Different Models

Hi Team, I have two different models on same PBI file. Model 1 is Normal view, Model 2 is history view. This two models are coming from same datasource and independent on Power bi level so top of this i have implemented on roles(Both the models having same roles) but roles not working properly. The issue is when i create Country= india on model1 it restricting on only model1 but not resticting the model 2. but my scenario is if i create Role as country it should be restricting entire report level. Might be the cause is there is no relationship in between these models. How to fix this roles and restict one role with two models.

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    Row-level security restricts data access for a given user by filtering rows using relationships based on roles. 

    You need to create RLS for both model one and model two when you create the role.

    For example, based on the description, I created a simple model.

    Apply the same RLS rules on DimTable1 and DimTable2.

    RLS not applied:

    View as role A:

    The PBIX file is attached for reference.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous Can you share the screenshot of how the models been built?

     

    And yes, is there any relationship between Country of model 1 table to Model 2 country table column.

     

    If not then do create a common Country table, have the relationship to both models country column which you want the filter should be applied.

     

    And apply RLS on common country table.

     

    Let me know if that helps.

     

    Accept the solution if that fulfills your need.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Row-level security restricts data access for a given user by filtering rows using relationships based on roles. 

    You need to create RLS for both model one and model two when you create the role.

    For example, based on the description, I created a simple model.

    Apply the same RLS rules on DimTable1 and DimTable2.

    RLS not applied:

    View as role A:

    The PBIX file is attached for reference.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data