Forum Discussion

jma-consult's avatar
jma-consult
Frequent Visitor
3 years ago

RLS Dynamic on 2 different Dimension Table

Hi,

I need to create a Dax Rule on 2 different Dimension Tables.

1 Hierachic Dimension

1 Businness Dimension

For information  I have also 2 facts Tables.

The problem is when I create My currently Dax Function :

Hiearchic Dimension :

CONTAINS (
D_accredit,
D_accredit[UserPrincipalName],
USERPRINCIPALNAME(),
D_accredit[Unit],
[Unit]
)

Business Dimension

CONTAINS (
D_business,
D_business[UserPrincipalName],
USERPRINCIPALNAME(),
D_business[Name],
[Business Name]
)

 

I have only the data in the both filters.

But I need a OR filter

For exemple I need to show Business = "Marketing" or Acreditation = "France Area"

 

Some one has a solution ??

 

Thank you in advance!

 

2 Replies

  • jma-consult , When you create 2 roles and assign to use you can get OR, Single role two conditions are AND

     

    Also, you can have measure not column using userprinicpalname

     

    You will have roles like

     

    D_accredit[UserPrincipalName] = USERPRINCIPALNAME()

     

    Power BI- Row Level Security: Handle ALL, UserPrincipalName: https://youtu.be/KVLEnIUo4pc