AnsweredAssumed Answered

How to calculate a field based on a rolling date range?

Question asked by heathmanderson on Jul 7, 2020
Latest reply on Jul 10, 2020 by xander_bakker

I have a arcade formula that gets a the previous 7 days date but how do I sum the values of a field based on the rolling date range? Xander Bakker


var startDate = Date($feature.ReportDate);
var oneWeekBefore = DateAdd(startDate, -7, 'days');


IIf(($feature.ReportDate <= startDate && $feature.ReportDate > oneWeekBefore), Sum($feature.Active), 0);