Forum Discussion

karthick2's avatar
karthick2
New Member
8 years ago

Lost Customers

Hello All,
 
I am very new to power bi, I was practising a exercise in which i need to find lost customers .
After Various searches i did figured out the caluculaiton part, But i didn't understand the logic behind.
 
LostCustomers = Var Customers=ALLSELECTED(Orders[CustomerCompany])
Var TimeFrame=90
Return COUNTROWS(FILTER(Customers,CALCULATE(COUNTROWS(Orders),FILTER(ALLSELECTED('Date'[Date]),'Date'[Date]&gt;MIN('Date'[Date])-TimeFrame&amp;&amp;'Date'[Date]<MIN>MIN('Date'[Date])-TimeFrame&amp;&amp;'Date'[Date]<MIN></MIN></MIN>

1 Reply