Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Retention Condition measures

Hi, I have been posting this same problem but could not solve it yet.

I attached my demo power bi file in the googld doc link.

So, I need to get customer who meets at least one of the 3 conditions below.

 

Let's say our company is doosan.

 

case 1. customer purchased from apple within last 24 months but did not purchased any other companies' products for 24 months.

case 2. customer bought apple 3 years ago but did not make any purchases from other companies.

case 3. customer bought apple first 3 years but did not make any purchases from other companies.

 201520162017201820192020
Customer 1xxxxDoosanx

Customer 2

xxxxxDoosan
Customer 3xxDoosanxxx
Customer 4catCatcatdoosanxx
Customer 5xdoosandoosandoosancatdoosan
Customer 6doosandoosandoosanxxx
Customer 7xxcatdoosandoosandoosan
Customer 8xxxdoosandoosanx

Customer 1, 2, 3, 4, 6, 7, 8 are retained customer and 5 is not because customer bought microsoft product on 2019.

But if I make table that is filtered on year 2015, customer 5 is retained and if customer 5 bought microsoft on 4/1/2019, then customer should be marked as a retained customer before 4/1/2019. 

If any of apple customer bought other companies' product also cannot be a retained customer.

 

I have calculated some measures to get those cases.

Total Doosan = CALCULATE(DISTINCTCOUNT('UCC DATA'[UCC Serial Num]), 'UCC DATA'[Manufacturer]="DOOSAN")
-> This formula shows me the total number of Doosan equipment that a customer bought.
case 1 = IF(CALCULATE([Total Doosan],DATESINPERIOD(dCalendar[Date],MAX(dCalendar[Date]),-24,MONTH))>=1,1,0)
-> This one is the first condition. It seems working fine but I wanted get this one checked to see if there are outliers.
Case 2 = IF(CALCULATE(SUM('Customer Master'[UCC - All New Units]), DATESINPERIOD('dCalendar'[Date],MAX('dCalendar'[Date]),-23,MONTH))<1 && CALCULATE([Total Doosan], DATESINPERIOD('dCalendar'[DATE],EDATE(MAX('dCalendar'[Date]),-23),-12,MONTH))>=1,1,0)
-> This one I do not think it is working properly but I got a feeling that this formula needs revision.
I haven't started case 3 but can anyone be able to check if I am on track and the formula is used correctly?
 
Here is the link that you can download my demo file.
 
Thank you.
 

3 Replies