1 Reply Latest reply on Mar 2, 2017 7:55 PM by Bill Lyons

    How to create a loop between employee's and respective manager till the last Manager is identified

    Vishant Nayak

      Hi Team,

       

      Considering these two columns one is "Employee ID" and second "Manager ID".I am trying to get the last manager basically the head of the company manager name  "X" and try to use the below formula used in excel.

       

      I do this in excel = vlookup("manager id", "Emply id,ManagerID",Manager id,0)  copy this formula in all the columns till i get the last manager id, in this example it would be "7856"

       

       

      Emply IDManager ID
      1065728765
      1065828766
      2876534526
      345267856
      2876613245
      1324523145
      231457826
      1456832415
      32415156789
      15678923457
      234577826

       

      Desired out put below mentioned

       

      Formula used vlookup("manager id", "Emply id,ManagerID",Manager id,0).. so to get the last manager id copied in all columns

      here the last manager id is "7826"

       

      Manager ID4Manager ID3Manager ID2Manager IDEmply ID
      7856345262876510657
      782623145132452876610658
      78563452628765
      785634526
      7826231451324528766
      78262314513245
      782623145
      7826234571567893241514568
      78262345715678932415
      782623457156789
      782623457

       

      I don't know how to apply in tableau, so haven't attached any workbook.

      Please can you help with any suggestion on how to apply the above logic in the tableau.