Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i need a counter in a textbox .. this is what i have now and works:
COUNT(IF(
VALUE * OPENAMOUNT / AVG(TOTAL VALUE * OPENAMOUNT) > vMin
AND
VALUE * OPENAMOUNT / AVG(TOTAL VALUE * OPENAMOUNT) < vMax
,OPENAMOUNT))
Now i want to add the following row.. result : text object shows a ' -' instead of a value
AND
COUNT(DateTime)) > vMin_Counter
what wrong?
You are trying to use nested aggregation - one aggregation function (count in this case) within another. It cannot be done directly.
See help and examples on aggr() function that helps to resolve the problems exactly like this one.
(Actually, the avg() function is also aggregation, so I'm wondering why it works... Maybe the "total" qualifier helps here.)
i dont see it .. do i need to aggr on top AGGR(COUNT(IF(...) ? or aggr(count(datetime)
tried several options
thanks for your reply!
Certainly aggr(count(datetime), field1, field2, ...).
What fields to use in aggregation - I can't tell. It depends on your data model and what you're trying to count. It may be one field or multiple.
sorry to bother .. but can someone write this out for me .. i cant get it working .. thanks in advanced!
I don't think it is possible to write a correct expression with aggr() function without having at least the data model. You have to do it yourself.
I can suggest an alternative. Create one more variable:
vCountDT = count(DateTime)
and, use it in your expression:
AND
vCountDT > vMin_Counter