2 Replies Latest reply: Feb 18, 2018 7:11 AM by Andranik Stepanyan RSS

    How to compute the number of elements above group's mean value?

    Andranik Stepanyan

      How is it possible to compute the number of elements (observations) above each group's mean value. The table or chart should show for each category/group the number of observations which are above of mean of the categrory (Attention: Not the overall mean of all categories). There are more than one category in the dataset I am working on.


      I tried to use the following code to achieve the desired result:


      =aggr(Count({<pb={">= $(=avg(pb))"}>}[key.ID]), type)




      =Count({<pb={">=$(=avg({1} total pb))"}>} [key.ID])


      Unfortunately, both codes compute as compared with the overall mean.


      Any help would be highly appreciated. Many thanks in advance.