'Can a filter be used in PowerBI to filter for all children in a hierarchy?

I have a table of employees and their managers with the path function as a new column(top left in picture)

I have a table of data (bottom of picture).

What I want is to have the filter visual to display all employees under the selected name in the hierarchy. Example, when Walter White is selected in the filter, the expected result in the bottom table should be Jesse Pinkman, Saul Goodman, Walter White.

enter image description here

I've implemented the hierarchy RLS in the modelling section using user principal name in a separate document. Could one use PATHCONTAINS and MaxX and adapt it to a filter visual somehow...?? I can't wrap my head around it. I have the code that works in the modelling section...

PATHCONTAINS(Employees[Path],MaxX(Filter(Employees,[Email]=USERPRINCIPALNAME()),Employees[ID]))


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source