I have a fact table with a list of lead submissions from online forms. One column, leadentereddatetime indicates when the lead submitted the form. The second column, 1stcontactdatetime, indicates when a call center agent followed up with that lead.
I’m trying to create a dax measure which counts the total leads, but only when a call center agent calls back the lead on the same day that the lead submitted the form. Basically I’m trying to figure out the percentage of leads which get a call back on the same day they submit an online form (vs waiting until the next day or longer).
already have a [leadcount] measure, which simply sums the leads in the list, but now I need to filter this count based on the above criteria.
Here’s my first attempt at this measure:
Count of Same Day Contacts = CALCULATE([LeadCount],
Filter(DimLeads, DimLeads[1stContactDateTime] = DATE(year(DimLeads[leadentereddatetime]), MONTH(DimLeads[leadentereddatetime]), DAY(DimLeads[leadentereddatetime] ) ) ) )
My goal here is to count the leads, but only those in which the 1stcontactdatetime DATE is the same as the leadentereddatetime DATE. Somehow it needs to disregard the time aspect, and only capture the day.
By this logic, if the DAY that the call back occured is the same as the DAY that the lead form was submitted, the lead would be counted. Otherwise, if the day is greater (implying it took place the next day), then that lead would be filtered out.
Thanks, everyone for your help!