Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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.
Solved! Go to 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.
Hi,
Share the link from where i can download the file. Also, show the expected result there.
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
91 | |
89 | |
79 | |
69 | |
68 |
User | Count |
---|---|
222 | |
128 | |
117 | |
82 | |
77 |