6 Replies Latest reply: May 28, 2013 5:58 PM by Prakash Elumalai RSS

    Set Analysis, count distinct

      In the attached qlikview document, the time periods are given as input box providing the users the flexibility to change time periods. I already have a text box with set analysis expression that calculates emp ID that overlap in both time period. I woud like to modify by set expression to answer the following -

       

      I need two text boxes -

       

      First Expression - I want to count the employees present in both time periods with same grade in both periods - The result should be 1 as you can see EmpID 2 is the only one that fits this criteria.

       

      Second Expression - I want to count the employees present in both time periods and with only positive increase in grade points - The result should be 1 as you can see EmpID1 is the only one that fits this criteria as the grade points for ID -1 increased from 10 in 2009 to 20 in 2010. In my context it essentially calculates promotions in my dataset.

       

      Thanks a lot for your help!