In BizTalk 2006, you can define alerts based on real-time aggregations or scheduled aggregations based on analysis cubes. For aggregated alerts, you have the option to specify a time window. This binds the alerts to be aggregated within a time past to the present.
For example: Say there is a purchase order activity, time dimension “Received Time” that has Year, Month and Day as its members. There is also a measure Total Sales. Let’s say you want to define such that if the Total Sales of all purchase orders received for the past 7 days are greater than $1000, you receive an alert. You would specify “Received Time” and 7 days as the time window, measure as “Total Sales”, the threshold at $1000 and threshold operator as “>”. Note that the time window is always relative to the present time.
Note: Real-time aggregated alerts without a time window only makes sense when the alert has a progress dimension member and the instances that are aggregated are not completed. This is because only a slice of data is available in the real-time aggregated tables and the duration which the slice spans is dependent on the real-time aggregation window. For example, it does not make sense to specify a real-time aggregated alert that queries total sales of purchase orders that are shipped (i.e. purchase orders are completed). One has to bound it within a time window: Total sales of purchase orders that are shipped for the past 7 days. Queries like “total sales of purchase orders that are in fulfilling state” is valid because incomplete instances are not discounted from the real-time aggregation.