Forum Discussion
Help with Path sort of
- 4 years ago
Hi bvilten
To check whether a particular user should be visible (i.e. whether they are either the logged in user or somewhere below the logged in user in the hierarchy), you can check whether the Index of the current user is in the Manager_Path of each user.
You could write your MgrUserFilter as this:
MgrUserFilter = VAR CurrentUserIndex = LOOKUPVALUE ( TechMgrEmail[index], TechMgrEmail[userPrincipalName], [ReportViewer] ) RETURN -- Return 0/1 INT ( PATHCONTAINS ( SELECTEDVALUE ( TechMgrEmail[Manager_Path] ), CurrentUserIndex ) )Regards,
Owen
Hi bvilten
To check whether a particular user should be visible (i.e. whether they are either the logged in user or somewhere below the logged in user in the hierarchy), you can check whether the Index of the current user is in the Manager_Path of each user.
You could write your MgrUserFilter as this:
MgrUserFilter =
VAR CurrentUserIndex =
LOOKUPVALUE (
TechMgrEmail[index],
TechMgrEmail[userPrincipalName], [ReportViewer]
)
RETURN
-- Return 0/1
INT (
PATHCONTAINS ( SELECTEDVALUE ( TechMgrEmail[Manager_Path] ), CurrentUserIndex )
)
Regards,
Owen
- bvilten4 years agoHelper III
Thank you Owen,
You provided the exact solution I needed. I had finally stumbled across the VLOOKUP function but wasn't sure how to apply it.