Forum Discussion
Role based on location
- 3 years ago
Hi Jan_Trummel ,
According to your description,here's my solution. Use Row-level security (RLS) like this:
1.Click Home>Manage roles.
2.Add a new role, filter the Account column in Accounts table:
[Account] = USERPRINCIPALNAME()3.Filter the Location column in Sales table:
SWITCH ( MAXX ( FILTER ( 'Accounts', 'Accounts'[Account] = USERPRINCIPALNAME () ), 'Accounts'[Location] ), "North", [Location] = "North", "South", [Location] = "South", "ALL", [Location] IN { "South", "North" } )Get the correct result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Jan_Trummel ,
According to your description,here's my solution. Use Row-level security (RLS) like this:
1.Click Home>Manage roles.
2.Add a new role, filter the Account column in Accounts table:
[Account] = USERPRINCIPALNAME()
3.Filter the Location column in Sales table:
SWITCH (
MAXX (
FILTER ( 'Accounts', 'Accounts'[Account] = USERPRINCIPALNAME () ),
'Accounts'[Location]
),
"North", [Location] = "North",
"South", [Location] = "South",
"ALL", [Location] IN { "South", "North" }
)
Get the correct result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.