The first formula is right and the second wrong.
Another, smaller way, to write the first formula, in Sheet3!M2:
=SUMPRODUCT(SUMIFS($P:$P,$O:$O,CHOOSE({1,2},Income,House)))
House refers to: =Sheet3!$S$1:$S$2
[TABLE="width: 2"]
<TBODY>[TR]
[TH] [/TH]
[TH="width: 30, align: center"]K[/TH]
[TH="align: center"]L[/TH]
[TH="width: 30, align: center"]M[/TH]
[TH="width: 30, align: center"]N[/TH]
[TH="width: 30, align: center"]O[/TH]
[TH="width: 30, align: center"]P[/TH]
[TH="width: 30, align: center"]Q[/TH]
[TH="width: 30, align: center"]R[/TH]
[TH="width: 30, align: center"]S[/TH]
[TH="width: 30, align: center"]T[/TH]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: left"]A[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"] [/TD]
[TD="align: left"]A[/TD]
[TD="align: left"]R[/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: right"] [/TD]
[TD="align: left"]Result[/TD]
[TD="align: right"]42[/TD]
[TD="align: right"] [/TD]
[TD="align: left"]F[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"] [/TD]
[TD="align: left"]B[/TD]
[TD="align: left"]G[/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: left"]D[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"] [/TD]
[TD="align: left"]C[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: left"]R[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"] [/TD]
[TD="align: left"]D[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: left"]T[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: left"]E[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: left"]C[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: left"]C[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: left"]G[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: left"]B[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[TD="align: right"] [/TD]
[/TR]
[TR]
[TD="colspan: 11"][Book1]Sheet3[/TD]
[/TR]
</TBODY>[/TABLE]