I am looking to count the number of cases where two activities occur within a short window of time, but running into my aggregation incorrectly counting number of activities. Imagine an activity table like this: Case 1 - Activity A - 1PMCase 1 - Activity B - 2PMCase 1 - Activity C - 3PMCase 1 - Activity D - 4 PM I want to aggregate on another column. I am using OLAP Table and my KPI is: Name: count of cases when Activity C happens < 2 hours from Activity B Formula:SUM(CASE WHENHOURS_BETWEEN(PU_FIRST(Cases,Eventtime,Activity=Activity B),PU_FIRST(Cases,Eventtime,Activity=Activity C)) < 2THEN 1ELSE 0END) When I run this against a list of all cases, I get the right answer 1, but when I aggregate it, I'm getting 4. I thought this would only evaluate once per case... is that incorrect? Thanks,Matt