Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Measure for Direct Reports

We are building a report that uses RLS based on the PATH.

 

But they also want one page where a report consumer will click a button and see only their Direct Reports versus their whole team, which is what we get with the RLS. We are trying to write a measure that will produce the same results as the statement below which we can apply as a filter for that page. 

'Staff'[EMAIL]=userprincipalname()
||
'Staff'[MGRMAIL] = userprincipalname()

 

Any assistance would be my appreciated. Thanks in advance! 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

    I think you can create a 'user mapping' table link to other tables with 'user id' and corresponding username.
    Then you can create a parent-child user id mapping table link to the 'user mapping' table to setting relationship. After these steps, you can use the username to lookup correspond 'user id' and 'manager id' and use relationship keys to filter other table records.

    Regards,

    Xiaoxin Sheng