Hi all!
I'm working on this report, And i need to get a distrinct count on person_ids
But the count is situational (actually 2 counts possibly more depending on how i write them)
Count1 is a count where on the Last visit, (Maximum(Enc_Timestamp))
everything met our goal.
Count2 is on the Last visit, 1 or more goals were not met.
The person needs to have come in at least 2times in the given time frame.
Does anyone know how i could count this kind of evaluation?
I tried to do something like, if goal1 = met and enc_timestamp = Maximum(enc_timestamp) then 1 else 0
but it gave me an error because the Maximum isn't a constant value. since the maximum gets re-evaluated for each person.
does anyone have any ideas? (besides a SP?)