Forum Discussion

rdwd15's avatar
rdwd15
New Member
4 years ago
Solved

How to createtable from one table but filtering based on values from another table

Hello Friendly Helpers, I have been racking my brain and the interwebs and the youtubes for this.  I am former DB dev, and i could so this faily easily in SQL, but alas I am using the tools availabl...
  • jsaunders_zero9's avatar
    4 years ago

    Hi rdwd15,

    Have you considered using PATH as a basis to build your org heirachy?

     

     

    Heirachy = PATH(Employee[EmployeeID],Employee[ManagerID])

     

    Let me know if that helps

  • jsaunders_zero9's avatar
    jsaunders_zero9
    4 years ago

    To further expand on the above, splitting it can be done using PATHITEM (Index from left) or PATHITEMREVERSE (Index from right).

    Manager 1 = PATHITEMREVERSE(Employee[Heirachy],2)
    Manager 2 = PATHITEMREVERSE(Employee[Heirachy],3)
    Manager 3 = PATHITEMREVERSE(Employee[Heirachy],4)