Imagine an activity table like this:
Case 1 - Activity A - 1PM
Case 1 - Activity B - 2PM
Case 1 - Activity C - 3PM
Case 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 WHEN
HOURS_BETWEEN(
PU_FIRST(Cases,Eventtime,Activity=Activity ,
PU_FIRST(Cases,Eventtime,Activity=Activity C)
) < 2
THEN 1
ELSE 0
END
)
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