Sum amounts based on category and date
I have a table (Expenses) with 4 columns: Date, Description, Category, Amount. This table is on sheet "Year transactions". Then I have another table (Summary by categories) on sheet "January budget". Columns of this table are Category, Budget, Reality, Difference.
I need in the column Reality in the "January budget" sheet a sum of all transactions falling into a category defined in the Category column in "January budget" sheet, but only if the Date in Expenses table is within January. I wrote a following function in the cell:
SUMIFS(Year transactions::Expenses::Amount;Year transactions::Expenses::Category;$A2;MONTH(Year transactions::Expenses::Date);1) When there is just one row in the Expenses table, the Reality cell shows no error and displays the correct amount in that row. But when I add another row to the Expenses table, I get an error message "Function SUMIFS requires that all argument ranges are of the same size". (I translated from my language, the exact message in English might be different).
What's happening? Why the function doesn't work with more than one row?
iPad Pro, iPadOS 17