Forum Discussion
Dynamic Row Level Security in Power BI with if condition
Hi, Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attacehd in the end.
Table:
You may create a new role as below.
If(
userprincipalname()="[email protected]",
[Email]=userprincipalname(),
OR(
[Email]="[email protected]",
[Email]="[email protected]"
)
)
Result:
Best Regards
Allan
If this post helps,then consider Accepting it as the solution to help other members find it faster.
Hi v-alq-msft ,
Thank you so much for your reply. Actually my requirement is quite different. If the logged In user is not present in 1st table (Hierarchy' table) then use proxy from 2nd table. Somehow I am having difficulty while managing one user roles with 2 different tables and adding if condition.
The main requirement is, we have 'Hierarchy' table where the manager-employee hierarchy is defined. If the logged in user is not present in the Hierarchy table then he should be login as some proxy user. So we define other proxy table. But is it possible to achieve that by some other way or dynamically without building 'Proxy' table and by passing some parameters when user logs in?
Thanks,
Rinku