Forum Discussion
Row level security using if-clause
Hi Anonymous,
The star here means no restrictions. We don't need to set a rule for this situation. We only need to set the rules for those conditions that will filter out some values.
Best Regards,
Dale
- Anonymous8 years agoNot applicable
Thanks for your reply.
I am aware that the star means no restrictions. So if it always was the star value, then it would not be a problem.
However, in many cases there are restrictions on business area. So how could I tell Power BI that in case there is a star, it should ignore the rule applied, and in case there are restrictions, it should apply the rule?
- v-jiascu-msft8 years agoMicrosoft Employee
Hi Anonymous,
If it's a star, we just leave that field alone. If it has restrictions, it should have values and we can set it. Please refer to the snapshot below.
1. If there isn't any restrictions in the table "FactSales", we just leave it be.
2. If any tables have restrictions in one roles, we add them like below.
3. If one table have restrictions on more than one column, we just add them.
BTW, these work will done by hand, so the Power BI doesn't need to know what the star will be.
Best Regards,
Dale
- Anonymous8 years agoNot applicable
Hi Dale,
the field generally has restrictions, but for some users it doesn't. Hence I need to make it somehow dynamic, that in case the current user has restrictions, the rule has to be applied, and in case the current user does not have any restrictions (value: *), the rule should not be applied.
Do you see any way how that could be achieved? With an if-clause, or maybe the USERELATIONSHIP() function?
Thanks again,
Chris