Forum Discussion
Row level Security multiple columns Dynamic
- 11 months ago
Hi Negi
You can secure this scenario by building a mapping/security table where each row links a user to their allowed Region, Country, and City. Relating this table to your fact data makes RLS much easier to manage. Then, apply a single filter in your RLS role like:
[UserEmail] = USERPRINCIPALNAME()This ensures that each user only sees the rows matching their mapped access. A few points to keep in mind:
-
This approach avoids hardcoding filters for every column.
-
It’s easy to extend when new users, regions, or cities are added — just update the mapping table.
-
Use composite keys if you need to control access across multiple levels (e.g., Region + Country).
-
You can manage the mapping table in OneLake or SQL so that admins update permissions without editing the RLS role.
-
Test with different sample users to confirm that filtering cascades properly through all columns.
-
- 11 months ago
Hi rohit1991 ,
This function I can use in RLS role. but I am not able to understand , If I create a single table. for example it contains ID column and user email id where each row contains email id. than how I will make a relation which with new Mapping table with financial table since financial table will contains those information in multiple columns and in new mapping sheet it will contains those respective id in single column name id ?
if it's possible with any dynamic dax then pls share once. ?
- 11 months ago
Hi Negi
This can be solved by creating a single mapping table with columns like UserEmail, RegionID, CountryID, and CityID, where each user can have multiple rows if they need access to more than one level (for example Region + City). Connect this mapping table to your fact table and set the RLS rule as [UserEmail] = USERPRINCIPALNAME(). This way Power BI will automatically filter the data based on the mapping, and each user will only see the rows linked to their entries without needing separate RLS rules for every column.
Hi Negi,
I wanted to follow up on our previous suggestions regarding the issue. We would like to hear back from you to ensure we can assist you further.
Please let us know if there’s anything else we can do to help.
Thank you.
Hi Negi,
Just wanted to follow up and confirm that everything has been going well on this. Please let me know if there’s anything from our end.
Please feel free to reach out Microsoft fabric community forum.
Thank you.