cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ait-james
Frequent Visitor

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()

 

 

1 ACCEPTED SOLUTION
Eyelyn9
Community Support
Community Support

Hi @Ait-james ,

 

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())

 

Eyelyn9_0-1637635818980.png

Eyelyn9_1-1637636028296.png

 

 

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.

View solution in original post

2 REPLIES 2
Eyelyn9
Community Support
Community Support

Hi @Ait-james ,

 

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())

 

Eyelyn9_0-1637635818980.png

Eyelyn9_1-1637636028296.png

 

 

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.

View solution in original post

amitchandak
Super User
Super User

@Ait-james , 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

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors