Hi James,
There is another option, Please follow the below steps.
1) Create on restricted Key figure (selection - local) with doc type d1,d2 or based on your requirement.
2) Put this local KF to Formula KF and apply exception aggregation with sum and reference char is date.
Please try this. I hope you will get desire output.
Thanks,
Chandresh Patel