Average during one month
I have a date field (YYYY-MM-DD) and quantity field (Number). I would like to get an average field which will be the average of the quantity field of the month. When a new month starts the average should then be for this month. also when it is a change of year the average should be for example jan 2011. Could anyone help me with this calcutation ??