Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-eqin-msft
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
v-eqin-msft
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.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.