SUMIF + group by

Hi folks!

In a Calc sheet, I’d like to sum all daily incomes grouped by month

The formula should depend on the (MM/YY formatted) “Month” column.
Why not just use a manual “SUM(…)” formula? Because I’d like to still be able to sort the source table and add rows to the result table by extension with the mouse.
SUMIF would do the job if I added a helper column C with something like “=DATE(YEAR(A), MONTH(A))” but that’s not so elegant, obviously.

Please attach or link-in examples in the respective odf file format (.ods in case of Calc) wherever applicable. Images are only useful if the question is about unexpected/faulty views of a document, dialog, …

Hallo

Create a →Pivottable from the source with Dates in Rowfields and SumIncome in Datafield.

click into any Date-cell in Pivot-output and →→Data→Group……→by Month

And here come the links to the images:

Source table: http://imgur.com/j3ZkahT
Result table: http://imgur.com/KJQQ51h

In case of needing (?) immediate updates this kind of task can also be done based on formulas instead of the Pivot-table-tool. See this attached demo.

Wow, thank you so much! Already used SUMPRODUCT for weighted averages but didn’t know that it can apply here, too!

I many cases SUMIF or SUMIFS can also do it. I just prefer SUMPRODUCT for tasks of the kind for some not so obvious reasons.