hi razz. maybe an array formula in K2:
=SUM(COUNTIFS($C$2:$C$10,IF($G$2:$G$8=J2,$F$2:$F$8),$D$2:$D$10,">0"))
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.