Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Dynamic RLS not working

Hi there,

 

I would like to implement dynamic RLS based on USERPRINCIPALENAME().

I've tried setting it up, but didnt worked as i expected.

 

what am i doing wrong here?

 

ofcourse the measure 'Erwin email' is just to dummy the principal name.

 

Link to PBIX file 

 

 

  • Anonymous few things, change RLS to this because your measure contains the UPN

     

     

    to test you need to do this:

     

     

    and here is the output:

     

     

     

     

3 Replies

  • Anonymous few things, change RLS to this because your measure contains the UPN

     

     

    to test you need to do this:

     

     

    and here is the output:

     

     

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    realy 😂 i didnt worked because i didnt used the square bracktes [].

  • Anonymous hmmm, it is not random, it has a different meaning: anything in the quotes is treated as string, and if you want to refer to a measure or column, you have to wrap it in the square bracket. As a best practice, with columns, you will always use the table name and then the column name, for the measure you will never use the table name because it is global to the model.