Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I´m trying to do a count of an expression. The count and expression look like this:
Count
(
(if(Minimum='NA' or
Sum(Maximum)-
Avg(TotalSample)<=
Avg(TotalSample)-
Sum(Minimum),
Sum(Maximum)-
Avg(TotalSample),
Avg(TotalSample)-
Sum(Minimum))
/3/Stdev(TotalSample
))>=(133/100))
Does anybody know how I´m supposed to do this count in order for it to pase and work!?
Thank!
Marita
You can't embed an aggregation function into another (sum or avg into count), you need to use advanced aggregation to do something like this (check the aggr() function for more details).
The exact syntax is depending on the dimensions you want to use for the advanced aggregations, but it will look maybe like
Count
(
aggr
(
if(Minimum='NA' or (Sum(Maximum)-Avg(TotalSample) )<= (Avg(TotalSample)-Sum(Minimum)) ,
Sum(Maximum)-Avg(TotalSample),
Avg(TotalSample)-Sum(Minimum) )
/3/Stdev(TotalSample)
, AGGRDIM1, AGGRDIM2
) )