2 Replies Latest reply: Jan 16, 2013 3:40 AM by norrsken9 RSS

    Count with condition less more value and set



      The task is following:


      Name - emplyee name;

      Type -  work type Day, Night;

      Data - number of working iterations for emplyee;


      The issue is in to show in Text Object how many employees are complete the planned iterations, i.e. >=200;


      The expression to calculate it Avg({<Type={Night}>}Data)+Avg({<Type={Day}>}Data), further I have to add the condition that we are looking for that number of employees that have more than 200 iterations, so I add >=200. And further I have to count only those values in text object.


      So I do the following: Sum(Aggr(If((Avg({<Type={Night}>}Data)+Avg({<Type={Day}>}Data))>=200,1,0),Name)), i.e. means that I receive the data with 0 if the value less than 200, and 1 if more than 200, after that I sum the values and receive the needed Value.


      The question is that: is there any other more simple way to solve this task in Text Object?


      Thanks in advance!