With your posted example in A1:E8
This regular formula returns the sum of data cells where the date equals A6 and the Category matches the Col_A value
Code:
B7: =SUMPRODUCT(($A$2:$A$4=A7)*($B$1:$E$1=$A$6)*$B$2:$E$4)
Is that something you can work with?