Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Row Level Security in an Org Chart

Hello.

I have a table representing all people in an organization, and who they report to. See below:

ManagerPersonAssociate IDBonus
Steve PMitch M1235

$50

Steve PJustin S1236$60
Justin SAlexey A1432$50
SalSteve P1564$70

 

I want to create a way for all managers to see the Bonus field for all of their reports as well as the people who report to their reports. For example, Sal should see all data for everyone because he is at the top of the org chart. Steve should see Justin, Mitch, and Alexey. Justin should see only Alexey. Mitch and Alexey have no reports, so they should only see themselves.

 

Is there a measure or another table I need to make to add some sort of flag or way to filter this table based on reports? IDEALLY I would like to create a scatterplot where RLS can be applied so that managers can see their reports (and their reports reports) plotted with their bonuses showing.

Thanks!

  • PC2790's avatar
    PC2790
    4 years ago

    I have done that for you already in the sample file.

    In modeling---> manage roles ---> create a new role and use the dax as used in the sample file provided above.

    See if you are able to do it

     

5 Replies