CodePudding user response:
You cannot use SUMIFS() in arrayformula. You can use SUMIF() though.
=ARRAYFORMULA({"Totals";IF(A2:A="",,SUMIF(data!C:C&data!D:D,"alpha"&C2:C,data!E:E))})
should work
CodePudding user response:
try:
=INDEX(QUERY(QUERY({FILTER(data!D:E, data!C:C="alpha");
FLATTEN({2021, 2022}&"-"&TEXT(SEQUENCE(12), "00")), SEQUENCE(24, 1,,)},
"select Col1,sum(Col2) where Col1 matches '^(2021.*|2022.*)' group by Col1"), "offset 1", ))