3 Replies Latest reply: Jul 3, 2017 10:59 AM by Mohammed Al Radi RSS

    Average Number of Months Worked Per Year

    Mohammed Al Radi

      Dear Qlik Community,


      I am currently trying to calculate the average number of months worked per year. I believe these are the relevant fields in my dataset:







      I cannot seem to figure out the right expression that reads:


      'average number of months worked in 2015 only counting employees that earned greater than 0 in 2015'


      I tried this but no luck


      (avg ({$<[Employee]= {'=sum ({<Year={2015}>}[Salary])>0'}>} [Month]))


      Your help would be much appreciated.