# Left join 2 sheets on 2 key values, add constant value

I'd like to join by date on these 2 sheets (`Income` & `Expense`), on key values `month` and `day` and add constant value from `FixedCost` sheet, Desired result, with subtotal on `Dashboard` sheet: How can this be done? I've seen the array formula solution, but it looks like an inner join instead of a left join here: LEFT JOIN two and more tables in Google Sheets

``````=ARRAYFORMULA({Income!A1:E1, Expense!C1:D1, "FixedCost", "SubTotal";
INDIRECT("Income!A2:E"&COUNTA(Income!A2:A)+1),
IFERROR(VLOOKUP(TRANSPOSE(QUERY(TRANSPOSE(INDIRECT("Income!A2:B"&
COUNTA(Income!A2:A)+1)),,999^99)),
{TRANSPOSE(QUERY(TRANSPOSE(Expense!A2:B),,999^99)), Expense!C2:D}, {2, 3}, 0), 0),
TRANSPOSE(SPLIT(REPT(FixedCost!A2&"♠", COUNTA(Income!A2:A)), "♠")),
ARRAY_CONSTRAIN(Income!C2:C-IFERROR(VLOOKUP(TRANSPOSE(QUERY(TRANSPOSE(
INDIRECT("Income!A2:B"&COUNTA(Income!A2:A)+1)),,999^99)),
{TRANSPOSE(QUERY(TRANSPOSE(Expense!A2:B),,999^99)), Expense!C2:D}, 2, 0), 0)-
FixedCost!A2, COUNTA(Income!A2:A), 1)})`````` • May I ask, without FixedCost & SubTotal, what it would look like? I'm thinking adding those 2 requirements is making it overly complex, I can add those fields separate from the ArrayFormula.. I'm trying to figure out the query but it's tough wrapping my head around it May 28 '19 at 12:41
• it would look like this: `=ARRAYFORMULA({Income!A1:E1, Expense!C1:D1; INDIRECT("Income!A2:E"&COUNTA(Income!A2:A)+1), IFERROR(VLOOKUP(TRANSPOSE(QUERY(TRANSPOSE(INDIRECT("Income!A2:B"& COUNTA(Income!A2:A)+1)),,999^99)), {TRANSPOSE(QUERY(TRANSPOSE(Expense!A2:B),,999^99)), Expense!C2:D}, {2, 3}, 0), 0)})` May 28 '19 at 12:45