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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Pick manager's team based on slicer

Hello,

 

I created an employee hierachy based on PATH and would like to use slicer to select that manager's team.

 

So, when I pick the name in the slicer's drop down list, the manager's entire team will all be selected.

 

I cannot use PATHITEM as one manager could be at any level. 

 

I tried to use PATHCONTAINS but it doensn't give me what I want.

 

This is my data table:

childID MgrID MgrPath Team

211|2False
411|4False
1231|3|12False
1 1False
1141|4|11False
1051|5|10False
961|6|9False
511|5False
611|6False
311|3False
721|2|7False
811|8False

 

Team = PATHCONTAINS(Sheet1[Mgr Path],SELECTEDVALUE(Sheet1[child ID]))

 

This is the report. Ideally, when I select 1, all the people will show up as everybody reports to 1.

 

Test - H.png

Thank you!!!

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

You may try this way:

Step1:

Add a separate ChildID table for slicer

childID = VALUES(Sheet1[childID])

Step2:

Use this formula to create a measure and use it to set visual level filter

Measure 2 = PATHCONTAINS(SELECTEDVALUE(Sheet1[MgrPath]),SELECTEDVALUE(childID[childID]))

Here is pbix file, please try it.

1.JPG2.JPG

here is pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

You may try this way:

Step1:

Add a separate ChildID table for slicer

childID = VALUES(Sheet1[childID])

Step2:

Use this formula to create a measure and use it to set visual level filter

Measure 2 = PATHCONTAINS(SELECTEDVALUE(Sheet1[MgrPath]),SELECTEDVALUE(childID[childID]))

Here is pbix file, please try it.

1.JPG2.JPG

here is pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you! But is that possible to use Measure 2 as a filter for the other charts? I tried but it didn't work. Ideally, we I pick certain manager at the slicer, all the charts will be filtered to reflect the manager's team stats.

 

Thanks !

Anonymous
Not applicable

 thanks!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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