Can you create an aggregate table in your data model:
,if((sum(a) / sum(b)) < 1000, 1, 0) as ThresholdFlag_Date_Object
create and join by composite key (timeStampDate & '-' & timestampDate)
or if you only need by date...
,sum(MeasureFlag) as ThresholdFlag_Date
group by timestampDate
drop table aggr_object_date;
and front-end would just be: sum(ThresholdFlag_Date)