Forum Discussion

prajaktakeni11's avatar
2 years ago

Multiple positions in organizations hierarchy RLS in Power BI server

Hello I want to apply RLS to my data as per hierarchy level ,
however there are multiple positions I want user to view data of users who are 2 level below him
Please note I don have level column
for example
I want user (F) to view data for (F,G and H)
same if user (C)logged in he can se data for (C,D,and E)
my path is
A|B|C|D|E|F|G|H
Thank You in advance

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi prajaktakeni11 ,

    You can create a calculated column named Hierarchy:

    Hierarchy= PATH(Employee[Employee ID],Employee[Parent ID])

     we go to the Manage Roles option, we need to apply the below filter to the Employee Table.

    PATHCONTAINS(PATH(Employee[Employee ID],Employee[ParentId]),MAXX(FILTER(Employee,Employee[Employee Name]=USERPRINCIPALNAME()),Employee[Employee ID]))

    To configure it at the Power BI Service level, one needs to go to dataset settings – Security  in  the Workspace

     

    Then, we can add the email addresses of the users to the roles.

     

    Best Regards,

    Xianda Tang

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

     

    • prajaktakeni11's avatar
      prajaktakeni11
      Icon for Helper I rankHelper I

      Anonymous  Thank you for your reply ,
      It is working fineas per your code it is giving me all the data for users below manager
      where as I want only 2 level data below manager 
      I want user (F) to view data for (F,G and H)
      same if user (C)logged in he can se data for (C,D,and E)
      my path is
      A|B|C|D|E|F|G|H
      Thank You in advance