changing average to count by days instead of number of records