Forum Discussion

alagator28's avatar
alagator28
Helper II
2 years ago
Solved

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.

 

 

 

 

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

     

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

     

     

     

2 Replies

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

     

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

     

     

     

    • alagator28's avatar
      alagator28
      Helper II

      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 🙂