Array enter with Ctrl+Shift+Enter not just Enter
=AVERAGE(IF(C2:C409=645,IF(B2:B409="I",D2:D409)))
It is a good idea to use an informative subject.
The message at the top that provides suggestions to posters may be a good read.
Hope that this helps and Welcome to the forum.
Dave