
1. Re: Sum Values Using Date Range as Criteria
swaroop.gantela Jul 11, 2018 5:33 PM (in response to Toby Holland)Toby,
I'm not sure if the following two methods will be feasible for your true dataset,
but maybe it can give ideas.
One method, would be to join the datasource to itself on a calculated field of 1.
This will create a large table of every date in conjuction with every other date.
But this can be filtered down using the same type of calculation you described:
IF [DepDate (second copy)]>=DATEADD('day',3,[Dep Date])
AND [DepDate (second copy)]<=DATEADD('day',8,[Dep Date])
THEN [Inbound (second copy)]
END
An alternative method is to use Lookups to look forward 3 to 8 days:
LOOKUP(SUM([Inbound]),3)+
LOOKUP(SUM([Inbound]),4)+
LOOKUP(SUM([Inbound]),5)+
LOOKUP(SUM([Inbound]),6)+
LOOKUP(SUM([Inbound]),7)+
LOOKUP(SUM([Inbound]),8)
Please see workbook v10.3 attached in the Forum thread.

275399rangecalc.twbx 54.3 KB
