As I mentioned in the note in my previous post... you must go and delete the extra space after the word Bag in each cell of column A.
or..
change formula to (which is not the better way):
=AVERAGE(IF(TRIM(A5:A28)="Bag",IF(D5:D28="On Time",C5:C28)))
Bookmarks