Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

row level security not working in app/web

Hi,   I have added a very simple row level security filter to one of my reports:   IF(userprincipalname()="[email protected]",[Email]<>"xyz",[Email]= userprincipalname()) This is working fine ...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Anonymous,

    Based on your description, you want to achieve the requirement that user123 can see all rows but other users can only see their respective rows.

    In your scenario, you can create two roles in Power BI Desktop,  one for user123 without any filter applied which is called Admin, and another role for other users with filter by UserName(). There is an example for your reference, in the second screeshot, replace the DAX with “[Email] = UserName()”.


    After you publish the report to Power BI Service,  go to Dataset->Security, add email address of user123 under Admin role, add email addresses of other users under OtherUser role. When adding members to the role in Power BI service, you can type in the email address, or name, of the user, security group or distribution list you want to add. For more details, please review this article: https://powerbi.microsoft.com/en-us/documentation/powerbi-admin-rls/ .

     

    Regards,
    Lydia