You can use a formula like this
=SUMPRODUCT(SUMIFS(Values,Key,Sum_Keys))
If Sum_Keys has 4 values then the SUMIFS formula returns a 4 value "array" (one for each Key in Sum_Keys) so you then need another function to sum that array. I use SUMPRODUCT because it avoids the need for "array entry".
You can add more conditions in the usual way, e.g.
=SUMPRODUCT(SUMIFS(Values,Key,Sum_Keys,Dates,Specifc_date))