Forum Discussion
Row Level Security - only allow certain users
Hi Anonymous ,
In Power BI, you can achieve your desired Row-Level Security (RLS) setup by creating different roles with specific filters.
You can create two roles like Basic User Role and Head Office Role.
Basic User Role filters data based on the user’s department, Head Office Role can create a second role with no filters. Add the head office users to this role in PowerBI.com. They will be able to view all data unrestrictedly.
Also if you don’t have a security group for head office users, you can keep all settings in Power BI Desktop, then you can use a 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 () )
You can read this topic for a further study: Solved: RLS - Allow certain users to see all. - Microsoft Fabric Community
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.