Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
or
=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.
Maybe something like
=Sum( Aggr( If( pb >= Avg(TOTAL<type> pb),1,0), type, [key.ID]))
Maybe something like
=Sum( Aggr( If( pb >= Avg(TOTAL<type> pb),1,0), type, [key.ID]))
it worked fantastic! Many thanks Stefan!