7 Replies Latest reply on Aug 10, 2018 9:30 AM by Zachary Adams

    Showing records for myself and all employees under me

    Zachary Adams

      I have a requirement that needs to use the USERNAME() function (aka. Logged in user on Tableau Server).  It also needs to return records for the logged in user and all the Employees that report up to that manager.

       

      So lets say I have the blow table:

      Employee IDManager Id
      100
      101100
      102

      100

      200101
      201101
      202102
      203102

       

      So if Employee 100 was the logged in user, they would see every record since they are the "root" of the hierarchy.  If 101 was logged in, they would see their records and 200 and 201's, since 200 and 201 report up to 101. 

       

      I am not sure on how to accomplish this but would appreciate any feedback y'all may have.    Hopefully this makes sense.