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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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