Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
arulmurugavel
Helper I
Helper I

Need Help to get the total count of phone calls made in first 7 days after the lead is created

Hi Guys,

 

I am new to power bi. I am trying to create a report using dynamics 365 data using power query. I have a data like below table 

Lead NameLead Created onActitvity Activity created date
Lead 128-08-2019Phone call29-08-2019
Lead 128-08-2019Phone call30-08-2019
Lead 128-08-2019Phone call31-08-2019
Lead 128-08-2019Phone call01-09-2019
Lead 128-08-2019Phone call07-09-2019
Lead 128-08-2019Phone call08-09-2019
lead 203-09-2019Phone call03-09-2019
lead 203-09-2019Phone call11-09-2019
lead 203-09-2019Phone call12-09-2019
lead 325-10-2019Phone call25-10-2019
lead 325-10-2019Phone call25-10-2019
lead 325-10-2019Phone call25-10-2019
lead 325-10-2019Phone call25-10-2019
lead 423-11-2019Phone call04-12-2019
lead 423-11-2019Phone call05-12-2019
lead 423-11-2019Phone call06-12-2019
lead 423-11-2019Phone call07-12-2019
lead 524-11-2019Phone call24-11-2019

I need to get the total count of phone calls made in first 7 days after the lead is created. Like below

Total calls made in the first 7 days of lead created date
Lead nameTotal calls in the first 7 days
Lead 14
lead 21
lead 34
Lead 4Blank or 0
Lead 51

Please help me with a solution

1 ACCEPTED SOLUTION
rainer1
Resolver III
Resolver III

Hi,

this is very easy to solve...

 

this should help you by generate a new calculated column

Calc = 

var leadCreated7d =  Tabelle1[Lead Created on] + 7

Return
IF(Tabelle1[Activity created date] <= leadCreated7d; 1; 0)

 

Just setting the value to sum.

sample3.PNG

 

Regards

 

Rainer1

View solution in original post

3 REPLIES 3
rainer1
Resolver III
Resolver III

Hi,

this is very easy to solve...

 

this should help you by generate a new calculated column

Calc = 

var leadCreated7d =  Tabelle1[Lead Created on] + 7

Return
IF(Tabelle1[Activity created date] <= leadCreated7d; 1; 0)

 

Just setting the value to sum.

sample3.PNG

 

Regards

 

Rainer1

Hello @rainer1 ,

This works... Thanks a lot for your help😀

 

Regards,

Arul

You are welcome 😁

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors