Forum Discussion
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
| 2 | 1 | 1|2 | False |
| 4 | 1 | 1|4 | False |
| 12 | 3 | 1|3|12 | False |
| 1 | 1 | False | |
| 11 | 4 | 1|4|11 | False |
| 10 | 5 | 1|5|10 | False |
| 9 | 6 | 1|6|9 | False |
| 5 | 1 | 1|5 | False |
| 6 | 1 | 1|6 | False |
| 3 | 1 | 1|3 | False |
| 7 | 2 | 1|2|7 | False |
| 8 | 1 | 1|8 | False |
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.
Thank you!!!
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.
here is pbix file, please try it.
Best Regards,
Lin
3 Replies
- AnonymousNot applicable
thanks!!
- v-lili6-msft
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.
here is pbix file, please try it.
Best Regards,
Lin
- AnonymousNot 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 !