I have data in the following format:
Date(dmy) | Area | Item_ID | Quantity
01-04-2016 | 201002 | AX | 10
01-04-2016 | 560001 | ML | 7
05-04-2016 | 201002 | AX | 3
10-04-2016 | 201002 | WAP | 16
30-04-2016 | 560001 | XY | 9
07-05-2016 | 560001 | ML | 20
10-05-2016 | 201002 | AX | 1
17-05-2016 | 560001 | AX | 2
31-05-2016 | 201002 | AX | 10
.
.
.
I need to do Quantity aggregation on Item_IDs and Area level on a monthly level. i.e. for the above data, required aggregated Output should look like:
Date(monthyear) | Area | Item_ID | Quantity
04/2016 | 201002 | AX | 13
04/2016 | 560001 | ML | 7
04/2016 | 201002 | WAP | 16
04/2016 | 560001 | XY | 9
05/2016 | 560001 | ML | 20
05/2016 | 201002 | AX | 11
05/2016 | 560001 | AX | 2
Intuition is: If (Area and Item_ID pair) is same in multiple rows of the same month, perform Quantity aggregation(sum).
Please help me perform this aggregation to get the result in this format itself. Thanks.