Joined: 16 Dec 2010
Location: United States
Online Status: Offline
Posts: 20
Topic: Conditional Count Posted: 11 Feb 2011 at 11:57am
I'm trying to create a running total with a distinct count for a field called vicidial_agent_log.lead_id, but each of these lead_id's are tagged with a result_code which is in the same table, but there can be multiple instances of the lead_id as the result_code can be different for each instance and so can the time they were changed. Essentially I wanted to know if there is a way that I can run a distinct count on the lead_id's where they only appear in the current day.
For Example:
LEAD ID RESULT CODE DATE
35518 CALLBK 2011-02-09
35518 NA2 2011-02-10
35518 YES 2011-02-11
So If were to run a lead count for the 9th it would return a 1, and if I were to run a lead count for the 10 or 11th, it would result 0's.
Let me know if there is any other information that you might need from me.
Joined: 16 Dec 2010
Location: United States
Online Status: Offline
Posts: 20
Posted: 16 Feb 2011 at 12:52pm
That still gives me numbers lead count numbers on the dates of the 10th and 11th. I don't think I was clear enough but, if I were to run that report ON the 10th or 11th it should result a 0, and if I run it on the 9th then and only then would it give me a 1. So regardless of the date range it would only count the first event.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum