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
LarsHolland
New Member

New and Returning Customers (within 14 days)

Hello,

 

I am hoping to get a report that details the number of new customers as well as the number of customers that returned within two weeks of their first purchase.

 

I have successfully implemented the New Customer Measure to have the count of new customers, but evaluating the number of customers that return within two weeks of their first purchase is eluding me. (The data set there mirrors the one I'm working with.)

 

Here is an example measure I've tried for customers returning within two weeks:

 

=COUNTROWS(
                             FILTER(
                                            ADDCOLUMNS(
                                                   VALUES(Sales[CustomerKey]),
                                                         "CountOfPriorPurchases", CALCULATE( COUNTROWS(Sales),
                                                                                                        FILTER(ALL('Calendar'), 'Calendar'[Date] < MIN('Calendar'[Date])))
                                                          ,
                                                          "PurchasesWithinTwoWeeks", CALCULATE(COUNTROWS(Sales),
                                                                                                                   DATESINPERIOD( 'Calendar'[Date], CALCULATE(MIN(Sales[OrderDate]),ALL('Calendar')), 14, DAY)                                                          
                                                          )),
                                                          [CountOfPriorPurchases] = 0 
                                                       && [PurchasesWithinTwoWeeks] > 0))

However, it isn't returning what I'm looking for. Looking for any assistance.

1 ACCEPTED SOLUTION

Hi,

 

I used this measure

 

=CALCULATE([Customers],FILTER(SUMMARIZE(Customer,[CustomerKey],"ABCD",MIN(Sales[Order Date]),"EFGH",[First order date]),[ABCD]-[EFGH]<=14))

I also edited one relationship.  See the file here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

Share the link from where i can download the file.  Also, show the expected result there.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Here is a link to the .pbix.

 

The table there is similar to the output I'm looking for. However, instead of the Returning Customers measure being [Customers] - [New Customers], I'd like it to be a measure of new customers in that period that also made a purchase within the following two weeks.

 

 

Hi,

 

I used this measure

 

=CALCULATE([Customers],FILTER(SUMMARIZE(Customer,[CustomerKey],"ABCD",MIN(Sales[Order Date]),"EFGH",[First order date]),[ABCD]-[EFGH]<=14))

I also edited one relationship.  See the file here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.