PIVOTBY is great for analysis, but PivotTables still have the edge when formatting needs to adapt to data changes.
A simple switch to SUMIFS can make your formulas easier to expand, read, and maintain as your spreadsheets grow.