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
ssaadat
Regular Visitor

Repeat Customers - for each Item.

Hi,

 

Good day to all,

 

I have been trying to create a measure to calculate number of repeated customers. To use in a matrix to filter for number repeated for each Item ID. I have used methods mentioned in the following links & been unfortunetly unsuccessful to get the accurate numbers confirmed using excel 

 count if $>0 (using pivot --> Num of orders:  ([Rows: Item_ID, Customer_ID] [Columns: dates] [values: bookings_$]))

then (  # Reorder: sumifs # num of orders > 1 for each Item_ID)

I have included a sample of the data similar to dataset used. 

 

The page is filtered for Bookings Only.

No date restriction. 

 

https://p3adaptive.com/2014/12/repeat-customers-in-dax-three-flavors/

https://www.daxpatterns.com/new-and-returning-customers/

 

Booking Table

Customer IDDateOrder IDShipping or bookedingItem IDUnit$Net Vs Gross
Brook_J02/13/2020Brook_J02/13/2020BookingZ2345515Gross
John_A03/25/2020John_A03/25/2020BookingE25251030Gross
Alice_M05/30/2021Alice_M05/30/2021BookingM4045840Gross
Michael_T10/17/2021Michael_T05/30/2021BookingG6065325Gross
John_A06/30/2020John_J06/30/2020ShippingE2525-10-30Cancellation
Brook_J05/20/2020 ShippingZ2345515Gross
Alice_M10/15/2021 ShippingZM4045840Groos
Michael_T12/30/2021Michael_T12/30/2021ShippingG6065-3-25Cancellation
Caroline_D05/25/2022Caroline_D05/25/2022BookingF9915550Gross
Caroline_D10/20/2022 ShippingF9915550Gross
Alice_M01/25/2022Alice_M08/25/2022BookingZ23452060Gross
John_A04/20/2022John_A04/20/2022BookingG60651030Gross
Alice_M04/20/2022 ShippingZ23452060Groos

 

Date Table

DateMonthYear
01/01/2020Jan2020
01/02/2020Jan2020
01/03/2020Jan2020
01/04/2020Jan2020

 

Customer info Table

Customer IDCityCountryNameLast Name
Brooke_jWashingtonUSBrookeJanin
John_ALos AngelesUSJohnAbraham
Alice_MMiamiUSAliceMorphy
Michael_TTexasUSMichaeltenant
Caroline_DTorotnoCACarolinDonway

 

 

 

1 REPLY 1
amitchandak
Super User
Super User

@ssaadat , in this blog, refer repeat and use customer and item inside summarize

 

example

Retained Customer This Month = sumx(summarize(Sales, Customer[Customer], Item[Item]), if(not(ISBLANK([MTD])) && not(ISBLANK([LMTD])) , 1,BLANK()))

 

 

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retenti...

 

 

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.

Top Solution Authors