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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.