Forum Discussion
Row Level Security - Filter Region
- 6 years ago
Hi Ritesh_Air ,
Try this:
1. Tables:
2. Create relationships.
3. Manage roles.
For Sales table,
[Region] IN SELECTCOLUMNS ( FILTER ( 'Region', RELATED ( 'User'[UserEmail] ) = USERPRINCIPALNAME () ), "Region", [Region] )For User table.
[UserEmail] = USERPRINCIPALNAME()Then, test.
BTW, .pbix file attached.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Is it a gen 1 workspace? I know the user must not have edit rights or RLS doesn't work. I do now know if that "feature" carried over to Gen 2 workspaces that have more roles (viewer, member, contributor, etc.) but you could set them for Viewer and see if that changes anything.
Thanks, it is gen 2 and it works perfectly, I just don't know how to restrict users for seeing their own data if it's in different region. I think I need to filter it in the data model but not sure how?
Please let me know, if you need more information. Would be happy to provide.
Thanks,
Ritesh