Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Using table like below to create row level security

I have a mapping table like this. How do I write a formula to filter projects only show = 1 for each individual? I was thinking using userprincipalname() but it's a measure so it' cant be used as a ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    Thanks FarhanAhmed  for sharing, here are some suggestions that I hope will be helpful to you.
    You can write the formula when creating the role:

    [Email] == USERPRINCIPALNAME() && [Show] == 1

     

    The formula uses this function to dynamically filter items based on the logged in user's email and the "show" column in the mapping table.
    Roles can be tested using views as, which allows you to simulate the experience of a user assigned this role.

     

     

     

    For more information about RLS, please refer to the document: Row-level security (RLS) with Power BI - Power BI | Microsoft Learn.

     

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.