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
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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.