Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

RLS using OR and AND

Hello,

 

How can apply a rule using OR please ?

 

I tried this, but I got error :

 

ongoing[ADCUID] = username() || ongoing[Work Location Country] = LOOKUPVALUE(Users[Work Location Country],Users[[ADCUID]],username()

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    I used the following formula, and it worked on my side, please try:

    [ADCUID] = USERNAME() || [Work Location Country] = LOOKUPVALUE('Users'[Work Location Country],[ADCUID],USERNAME())

     

     

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous , You can not use another table there. You can create two roles. one on each table, and when you apply both roles, it will be OR

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    I used the following formula, and it worked on my side, please try:

    [ADCUID] = USERNAME() || [Work Location Country] = LOOKUPVALUE('Users'[Work Location Country],[ADCUID],USERNAME())

     

     

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.