View My Drafts
Really hoping for some out-of-the-box help!TL;DR: Need RLS help with dual hierarchies. Admin should be able to see everyone in their department.I'm working on an "Accountability" dashboard for our organization. A contractor has developed a PowerApp to help track 'accountability' - basically a way for employees to check-in and take attendance daily. Employees can self-report or their admin officers can check them in.Primary tables are the ID table - one row per employee; unique identifiers include an ID # and email address. It includes columns that flag the user as an accountability officer or admin. It also includes columns for the department or office the employee works in. The accountability table records the employee's status for the day. Linked with the ID #, it includes their status (present, telework, vacation, etc) and timestamp.There are two levels of hierarchy at play. One is the employee's role. From lowest to highest, you're either Staff > Accountability Officer > Admin > Master. There's a four-row table that identifies the parent/child roles and relationship for these roles. The Roles column is linked to the Roles in the IDs table. The second level of the hierarchy is at the department/organization level. From lowest to highest, there's Office > Department > Organization. These are columns within the ID table and set as a hierarchy there.I've read so many articles and watched so many videos, but can't seem to get the RLS to work in this situation. I'll add a few screenshots, but don't have a dataset or .pbix I can upload at the moment due to PII. I'll see if I can recreate a dummy file.
I've created measures:
User = USERNAME()Userprincipal name = USERPRINCIPALNAME()I've only gotten as far as adding [email_addr] = USERPRINCIPALNAME() when creating roles, which allows the logged-in user to see their own information. I appreciate any insight, tips, or suggestions anyone can provide. Thank you!!
Did u get the solution for this issue , even i am stuck at the same scenario.