8 Replies Latest reply on Sep 10, 2017 9:48 AM by Deepak Rai

    Not able to calculate eligible employees using LOD

    Niranjan Solase

      Hey Guyz,

       

             Facing one complex issue and need your help in order to resolve it.

      Please check attached tableau workbook.

      I am trying to find out eligible employees based on tags. 

       

      Meaning - 

      For ID 123, respected tags are male, and veg and their respected employees are 2131,122312,8686. The task is to find out all users in this data for each ID who are eligible.

      E.g., for ID 123 (with its tag male, veg) find all the employees in this data who has either male Or veg tag in its employee_tag column. So for Id 123, along with its respected employees, 2131,122312 and 8686 der is another employee 333 who also has 'veg' in its employee tag. So total number of eligible employees for 123 has to be 4. (2131,122312, 8686,333) similarly for 124 it will be 2 (8689 and 122312 ),

      for 1255 it will be 4 (8689,6656,332,333) and for 1256 *** will be 4 again (8689,6656,332,333).

       

            

      statecityIDtagemp_id employee_tag
      nevadavegas123male,veg2131male,veg
      nevadavegas123male,veg2131male,veg
      nevadavegas123male,veg122312male,diabetic
      nevadavegas123male,veg122312male,diabetic
      nevadavegas123male,veg8686veg
      nevadavegas124Female,diabetic8689diabetic,italian
      nevadavegas124Female,diabetic8689diabetic,italian
      nevadavegas124Female,diabetic8689diabetic,italian
      nevadavegas124Female,diabetic8689diabetic,italian
      nevadavegas1255Italian,carowner6656carowner
      nevadavegas1255Italian,carowner6656carowner
      nevadavegas1255Italian,carowner6656carowner
      nevadavegas1255Italian,carowner332italian,carowner
      nevadavegas1255Italian,carowner332italian,carowner
      nevadavegas1255Italian,carowner332italian,carowner
      nevadavegas1256Italian,carowner333italian,veg

       

      In attached workbook I tries doing it but not successful.