Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Negi
Helper I
Helper I

Row level Security multiple columns Dynamic

Hi All,

 

I have 1 fact Table which contains approx 100 million rows of data. sample data as below. 

 After this I have created multiple tables which contains useremail id based on there user access and that infomation comes from Global ID, Region ID, Country ID, City ID columns. and all these seperate tables contains duplicate columns as well.

 

After created this tables I have make relationship between these tables based on respective ID columns but issue is that Global ID, Global ID, Region ID, Country ID, City ID contains duplicate ID as well since for 1 ID multiple users can have access also any user name can me mentioned in multiple ID tables as well. 

 

Please suggest how to implement RLS in this case.

 

Global IDRegion IDCountry IDCity IDDateCostCommission
GlobalRegion 1Country 1City 11-Jan-2554665
GlobalRegion 1Country 1City 12-Jan-2543565
GlobalRegion 1Country 2City 23-Jan-256665
GlobalRegion 1Country 2City 34-Jan-255437657
GlobalRegion 2Country 3City 45-Jan-2554665
GlobalRegion 2Country 3City 46-Jan-2543565
GlobalRegion 2Country 3City 57-Jan-256665
GlobalRegion 2Country 3City 68-Jan-255437657
GlobalRegion 3Country 4City 79-Jan-2554665
GlobalRegion 3Country 5City 810-Jan-2543565
GlobalRegion 3Country 6City 911-Jan-256665
GlobalRegion 3Country 7City 1012-Jan-255437657

 

Other tables are as mentioned below :-

Global Users 

Global IDUserEmail
GlobalUser 1 email
GlobalUser 2 email
GlobalUser 3 email
GlobalUser 4 email
GlobalUser 5 email

 

Region ID 

Region IDUserEmail
Region 1User 6 email
Region 2User 7 email
Region 3User 8 email
Region 1User 9 email
Region 2User 10 email
Region 3User 11 email
Region 1User 12 email
Region 2User 13 email
Region 3User 14 email

 

Country ID

 

Country IDUserEmail
Country 1User 15 email
Country 2User 16 email
Country 3User 17 email
Country 4User 18 email
Country 5User 19 email
Country 6User 20 email
Country 7User 21 email
Country 1User 22 email
Country 2User 23 email
Country 3User 24 email
Country 4User 25 email
Country 5User 26 email
Country 6User 27 email
Country 7User 28 email
Country 7User 10 email
Country 6User 6 email

 

City ID

City IDUserEmail
City 1User 29 email
City 2User 30 email
City 3User 31 email
City 4User 32 email
City 5User 33 email
City 6User 34 email
City 7User 35 email
City 8User 36 email
City 9User 37 email
City 10User 38 email
City 1User 39 email
City 2User 40 email
City 3User 41 email
City 4User 42 email
City 5User 43 email
City 6User 44 email
City 7User 45 email
City 8User 46 email
City 9User 47 email
City 10User 48 email
City 9User 14 email
City 8User 26 email
3 ACCEPTED SOLUTIONS
rohit1991
Super User
Super User

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.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

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.  ?

 

View solution in original post

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.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

6 REPLIES 6
v-sgandrathi
Community Support
Community Support

Hi @Negi,

Thank you @rohit1991 for your response.

Has your issue been resolved?
If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.

 

Thank you for your understanding!

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.

rohit1991
Super User
Super User

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.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

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.  ?

 

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.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors