• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need to get number of visits made by sales person till the time of first order placed by the customer

Pardhu Teja

New Member
I am analyzing the sales data for the FY 23-24 , So i have the data of number of visits made by the sales person monthly and number of orders placed by the same customer monthly.

I need to calculate the number of visits made by the salesperson before the customer placed the first order

(Eg: Sales person visited customer (X) 2,3,5 times respectively for the months of Apr, Mar and May and he made the customer to place order on May. So the result for this is 10)

Is there any formula for the same

Attaching the sample sheet for reference
 

Attachments

  • Sample.xlsx
    12.7 KB · Views: 12
I believe the raw data should contain the real dates of visits and orders before one can create a measure counting the number of visits between previous order and last order. Because that's basically what you want to do.
Else if the visit is in the same month, it can be either before or even after the order.
 
I believe the raw data should contain the real dates of visits and orders before one can create a measure counting the number of visits between previous order and last order. Because that's basically what you want to do.
Else if the visit is in the same month, it can be either before or even after the order.
Hi GraH

I have the data in real dates. I have converted the dates into months as the data looks easier to understand. But, I was unable to calculate the number of visits made before the first order placed.

Any other method to do?? From the raw data real dates directly?
 
for cell S3 =SUMIFS(C3:I3,C$2:I$2,"<"&INDEX(J$2:P$2,1,MATCH(TRUE,INDEX(J3:P3>0,0),0)))
and copy down
Thanks vletm,

This works. But, I need some more help. How to calculate the sum which includes the order received month visits too (The above formula is calculating visits till the before month of the first order, I need to include the order received month visits too)
 
attaching the sample Rawdata. please check
See formula in cell G2 of the Orders sheet in Chandoo55444_Formula_Raw data03.xlsx

Separately, a Power Query solution at cell G1 of the Orders sheet of the file Chandoo55444_PQ_Raw data.xlsx
 

Attachments

  • Chandoo55444_Formula_Raw data03.xlsx
    12.8 KB · Views: 6
  • Chandoo55444_PQ_Raw data.xlsx
    23.7 KB · Views: 3
Back
Top