
Re: a running calculated average, using expressions outside selection
Dirk Ooms Jul 17, 2012 3:24 AM (in response to Dirk Ooms )Found a solution which I'd like to share, because it opened a new world for me :)
This is the formula I use now in my example:
( RangeSum(Above(sum(X*Y),0,RowNo())) + sum( total {<T={"<$(=min(T))"}>} aggr( X * Y,T)) )
/
( RangeSum(Above(sum(X),0,RowNo())) + sum( total {<T={"<$(=min(T))"}>} aggr( X ,T)) )The trick is in the combination of sum,total,set analysis and aggr what gives me what I wanted, run expressions like (X*Y) over a field T ouside of the current selection of T.
In short this will give you always the same result, regardless of selection of T:
sum ( total {<T={"<5"}>} aggr(only( {1} Y * X ),T ))
Hope this helps someone!

Re: a running calculated average, using expressions outside selection
Nicolas Stefaniuk Jul 17, 2012 4:44 AM (in response to Dirk Ooms )If user filter on other field than "T" does it work?

Re: a running calculated average, using expressions outside selection
Dirk Ooms Jul 17, 2012 5:25 AM (in response to Nicolas Stefaniuk)sum ( total {<X={"<999"}>} aggr(only( {1} Y * X ),T )) does not has the same result
When filtering/selecting it doesn't sum all rows anymore, only the selected.

