Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Sha
Helper II
Helper II

How to show one level down in slicer for Employee Hierarchy

My RLS is set up to return the Manager of the user and all employees under that Manager (this allows user to see how they stack up to others under same team)

pathcontains(tEmployees[Employee path],
Maxx(
filter(
tEmployees,
tEmployees[Email]= USERPRINCIPALNAME()), tEmployees[Manager]))

 

**My slicer is working fine for this, it shows Employee, their Manager and their reports.  This page shows metrics/no details.

 

I want to show a different slicer on a different page for the User and his reports (not show the one level up Manager detail)

If I could create this in a measure and display it in a slicer, that would be perfect... but it's not working.

pathcontains(tEmployees[Employee path],
Maxx(
filter(
tEmployees,
tEmployees[Email]= USERPRINCIPALNAME()), tEmployees[UserId])) 

 

I thought if I could get the USERPRINCIPALNAME() and compare to the rows, then it would work... but I must not be doing it right.

if(LOOKUPVALUE(tEmployees[Email], tEmployees[EmpUserID],
    PATHITEM(tEmployees[Employee Path],1,0)) = USERPRINCIPALNAME(),"True", "False")
and then I thought I could do for each level until it is "True"
 
Any help would be appreciated.  Thanks.
 
Update:  I was able to place a filter on my slicer... 
if(max(tEmployees[Email]) = USERPRINCIPALNAME(), "True", "False")
Now my slicer shows the person logged in but not the people underneath.  If I click on level 3, I get the data for the people underneath that person and when I click on Self, I get only his data.  I really want to see the people underneath that level in the slicer.
Sha_0-1687488867514.png

 

 
 
0 REPLIES 0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.