Monimonika, you would only include {} (using CSE) if you are working with an ARRY formula - that is not an array formula

And, if that formula actually works for the OP, then perhaps a sumifS() would be more efficient...
=SUMIFS($E$3:$E$17,$C$3:$C$17,"Invoice",$D$3:$D$17"<"&$A$1)