In Excel, I have a table of historical value data of different items in multiple groups of items. As a new item's record entered, the old value of that item has to be abandoned and the total values of items in the group must be recalculated based on the new item's value. In each group, based on group name and date specified, just the last record of each item is embraced; every item has different last date less than the date specified. I want to find the sum of items' values in each group based on group name and specific date, how do i do this?

As displayed in the image, data are grouped in two groups, G1 and G2,... In each row I need to calculate the total value of items in its corresponding group that already been entered until that date. At the right of the table, I filtered the desired records based on the Date and Group fields, then the output will be the sum of the Values displayed in green frame. In date D3, as a new value entered for Item i11, the group total value recalculated based on this new value. Also in the table, the total value of each group in each row is displayed in column [Sum of Group], also by formula in the last two columns.
Data:
| Row | Group | Item | Date | Value | Sum of Group (expected output) |
|---|---|---|---|---|---|
| 1 | G1 | i11 | D1 | 10 | 30 |
| 2 | G1 | i12 | D1 | 20 | 30 |
| 3 | G1 | i13 | D2 | 30 | 60 |
| 4 | G1 | i11 | D3 | 40 | 90 |
| 5 | G1 | i14 | D4 | 50 | 140 |
| 6 | G1 | i13 | D5 | 60 | 170 |
| 7 | G1 | i13 | D6 | 70 | 190 |
| 8 | G1 | i13 | D6 | 80 | 190 |
| 9 | G1 | i12 | D7 | 90 | 260 |
| 10 | G1 | i14 | D8 | 100 | 310 |
| 11 | G2 | i21 | D8 | 110 | 110 |
| 12 | G1 | i13 | D9 | 120 | 350 |
| 13 | G2 | i22 | D9 | 130 | 270 |
| 14 | G2 | i21 | D9 | 140 | 270 |

