avg({< Value -= {0} >} Value)
This is a perfect solution but it got me thinking about the difference between "-=" and "=-". The former will take current selections in the Value field and then remove zeros. The latter will ignore current selection in the Value field and remove zeros from all possible values. To avoid the confusion you could use the following syntax instead:
avg({$-< Value = {0} >} Value)
This method would give the same answer but be careful if you try to add other selections to the set modifier as you would remove more data along with the zeros.
Some example of Set Analysis. Could be helpful
ReplyDeletehttp://community.qlikview.com/docs/DOC-4350
http://community.qlikview.com/docs/DOC-4275
http://community.qlikview.com/docs/DOC-4386