Forum Discussion

TonicQuake's avatar
TonicQuake
Regular Visitor
4 years ago
Solved

RLS - Allow certain users to see all.

Hello,   New to RLS in PowerBI and hoping someone can help.    I'm trying to setup Dynamic RLS but have an exception list of users that can access all data.    Current I have a many - many, fil...
  • AllisonKennedy's avatar
    4 years ago

    TonicQuake  I see two options for you.

     

    OPTION A: Create two roles

    This option works if you already have a security group that contains all the head office users and can add that in PowerBI.com

    Basic User Role

    This is what you already have - filters the data based on department.

    Head Office Role

    Create a second role that has no filters. Add the Head Office people to this role in PowerBI.com 

     

    OPTION B: Create a security filter mapping table

    This option works if you do not have a security group for the head office users, and keeps all the settings in Power BI desktop. Only one role is needed, but you'll need a more complex DAX filter in the RLS:

     

    All Users Role

    VAR _Role = MAXX(FILTER( UsersTable, UsersTable[UserEmail] = USERNAME() ), UsersTable[Department])
    RETURN
    IF( _Role = "Head Office", TRUE()
    ,
    [UserEmail] =
    USERNAME()
    )