Forum Discussion
Set security only for certain data
Hi Anonymous,
First of all thank you very much for your help! Sorry I did not explain the case clear enough. Let's say I have this table:
Business: Profit
A 13
B 14
C 15
Only managers can see profit for A, other people can only see the rest (B and C and other business). I have the list of managers, but not the list of other people (basically anyone else in the organisation). I have tried dynamic rls, but can not find any solution so that I dont need to go to the Power BI service and add each of the other people in.
Is there a solution to this case? Thank you!
Hi Anonymous,
I think you need to create role table to add tag for users.(mark normal user and manage)
For rls filter condition, I'd like to suggest you to use username find out role tag. If tag not manager, filter on Business column with value not equal to "A", otherwise not enable filter.
Sampel table:
| User | Premission |
| [email protected] | User |
| [email protected] | User |
| [email protected] | Manager |
Measure:
Permission = LOOKUPVALUE(Table[Role],Table[User],USERNAME())
Filter expression:
IF (
ISERROR ( SEARCH ( "Manager", [Permission] ) ) = FALSE (),
TRUE (),
[Business] <> "A"
)
Regards,
Xiaoxin Sheng
- Anonymous8 years agoNot applicable
Hi Anonymous:
So I still need to include each normal user in this role table?I am looking for a solution so I can avoid doing so, as there are endless number of normal users. I would like to manage only the list of managers, and anyone who is not in that list, will automatically have normal user right. Is there a way to do so?
Thanks,
Van- Anonymous8 years agoNot applicable
HI Anonymous,
>>So I still need to include each normal user in this role table?
Nope, my formula only check manager tag, if formula can't find specific user's tag, it will also return error and will be catched by ISERROR function.
Regards,
Xiaoxin Sheng
- Anonymous8 years agoNot applicable
Hi Anonymous,
Sorry for the late following up from this topic. I test the solution that you suggested. However, I still need to add each users on the row-level security in the app version. Otherwise, they will see this error message. Are there any other solutions to avoid doing so, as there are countless number of people that I would need to add here? Thank you!