Scenario:
Lets suppose we have a Dynamic RLS(Row Level Security) requirement as per below.
If an Employee is a Manager ( where [Is Manager] flag =1) then user should see all the data from the Sales table.
If an Employee is not a Manager ( where [Is Manager] flag =0) then user should see only the respective records from the Sales table.
The Data Model and sample tables as per below:
IF(
MAXX(
FILTER(ds_Employee,
ds_Employee[Emp User ID] = USERPRINCIPALNAME()
),
ds_Employee[Is Manager]
)=0,
ds_Employee[Emp User ID] = USERPRINCIPALNAME(),
1=1
)
--------------------------------------------------------------------------------------------------------
Thanks, TAMATAM ; Business Intelligence & Analytics Professional
--------------------------------------------------------------------------------------------------------
No comments:
Post a Comment
Hi User, Thank You for visiting My Blog. If you wish, please share your genuine Feedback or comments only related to this Blog Posts. It is my humble request that, please do not post any Spam comments or Advertising kind of comments, which will be Ignored.