'Dynamic Org Chart with slicers

I want to visualize my organization (org tree) in a power bi report with the ability to select the branch/subtree of the organization dynamically. For example, if I want to look a particular department's subtree, I can select, from a slicer, the head of that department and I will get that person's org tree with them at the top. Additionally, I would like to set up RLS to set the report so that it will only allow employees to see their own tree/subtrees with in their own tree. This is easy to do with the various path commands in DAX for a specific department, but I would like one report to rule them all.



Sources

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

Source: Stack Overflow

Solution Source