Forum Discussion

GSK_BI's avatar
GSK_BI
New Member
8 years ago

Retrieving first call attempt after a lead

Hi All,

I am new to Power BI and am currently using 2.55.5010.641 version of BI  Desktop.  I am getting familiar with DAX and how to migrate but having difficulty witht eh following scenario.  I have two tables linked with a many to one relationship RawCalls (Many) and Leads (One).  The key between these tables is ANI (telephone number).  I want to determine the first call that went out RawCalls.CallDateTime (actually +/- 15 minutes due to some timng issues) after a Lead came in Leads.Lead CreatedDateTime and calculate the time between (in seconds or I can convert to minutes).  I think I am way overcomplicating this but here is what I have written thus far:

 

FirstAttempt = VAR LeadDateTime = Leads[Lead CreatedDate]
RETURN CALCULATE (
//Tie-breaker
FIRSTNONBLANK(RawCalls[CallDateTime],0),
CALCULATETABLE (
LASTNONBLANK ( Leads[Lead ID], 0 ),
RawCalls[CallDateTime] >= (LeadDateTime-(.25/24)) 
)

 

I suspect there is a much easier way to do this and I want this FirstAttempt column to live in the Leads data table (creating a new column here).  Any help would be greatly appreciated.

 

Thank you!

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    GSK_BI,


    Please help to post sample data of your tables and post expected result here.

    Regards,
    Lydia