Forum Discussion

gsk135's avatar
gsk135
Regular Visitor
2 years ago
Solved

RLS with Page level security

I created a main page and two pages in the same report. Page A and Page B   main summary table contains all the data including fields region   I created a file PLS.txt with columns  username ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi gsk135 

     

    amitchandak Thank you very much for your prompt reply. Here please allow me to post some of my content.

     

    To restrict users to view only the regions they are assigned to in Power BI, you need to enhance the RLS settings by adding additional DAX filters that correspond to the regions.

     

    In Power BI Desktop, go to the Modeling tab and select Manage Roles. Create a role for each region and define a DAX filter expression to check the username and region.

     

    For each role, you need to create a DAX expression that matches the region field to the region assigned to the user. 

     

     

     

    [username] = 
    USERPRINCIPALNAME() 
    && 
    [Region] in SELECTCOLUMNS(FILTER('Table', [username] = USERPRINCIPALNAME()), "Region", [region])

     

    After you define roles and rules in Power BI Desktop, publish the report to the Power BI service.

     

    By performing these steps, you can ensure that users can only view data assigned to their zones based on the RLS policies you set.

     

    Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

     

    Regards,

    Nono Chen

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