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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
alagator28
Helper I
Helper I

RLS Filter with both OR and AND in same table

I'm having trouble formatting my RLS filters with both OR and AND on the same table. It seems that it doesn't like regular dax format...

 

If I wanted to filter for both criteria below, how could I format it?

 

  • "PrincipalClientManagerUsername" = userprincipalname() OR "PrincipalClientUsername" = userprincipalname()
  • AND "ColumnA" = "123"

 

The syntax below in the screenshot works fine for the first criteria, but I can't figure out how to add an "AND" correctly.

 

Thanks in advance.

 

RLS Filters.png

 

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You need to protect the OR from the AND. Use Parentheses or IN

 

USERPRINCIPALNAME() IN {[PrincipalClientManagerUsername],[PrincipalClientUsername] && [Column A]="123"

 

 

 

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

You need to protect the OR from the AND. Use Parentheses or IN

 

USERPRINCIPALNAME() IN {[PrincipalClientManagerUsername],[PrincipalClientUsername] && [Column A]="123"

 

 

 

Thank you @lbendlin , this worked perfectly. I thought I had tried that, but I must have had the syntax wrong. Very simple and it works just fine. Have a great day 🙂

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors