Hi all
I'm battling with DSum to sum the number of sales within a rolling 3 month period (the latest three months).
My formula is as follows...
...which I was hoping translated in to sum all "Sales" in "Table1" for when the months in which sales took place are between two months ago and within the latest sales month. So If MthdtSale was equal to 01/02/2017, I'd expect my DSum to return a value of the sales in both Jan-17 and Feb-17 (there will be sales in later months too, so important to specify a date range).
Even when I use...
It doesn't sum all sales after a given date - if the date was 01/04/2017, it seems to be summing everything from three months ago...not two.
Issues with DSum are quite common it seems (loads of articles online!!), but I haven't managed to amend the query as necessary to get it working as intended.
Please help...it's driving me mad!
I'm battling with DSum to sum the number of sales within a rolling 3 month period (the latest three months).
My formula is as follows...
Code:
RunSum: DSum("Sales","Table1","[MthdtSale]>=#" & DateAdd("m",-2,[MthdtSale]) & "# AND [MthdtSale]<=#" & [MthdtSale] & "#")
Even when I use...
Code:
RunSum: DSum("Sales","Table1","[MthdtSale]>=#" & DateAdd("m",-2,[MthdtSale]) & "#")
Issues with DSum are quite common it seems (loads of articles online!!), but I haven't managed to amend the query as necessary to get it working as intended.
Please help...it's driving me mad!