Forum Discussion

ssaadat's avatar
ssaadat
Regular Visitor
4 years ago

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