Forum Discussion
Anonymous
6 years agoNot applicable
Active / LeavingCustomers Measures
Hello, I am creating column chart by years/yearmonths with customers segmented by their activity: Active Customer: customer has status 'active' up to 15 month after his order. Measure is ...
- 6 years ago
Anonymous - Try this out:
Leaving Customers = VAR __Today = TODAY() VAR __Table = ADDCOLUMNS( ADDCOLUMNS( SUMMARIZE('Table',[CustomerEmail],"End15",MAX([Until 15M])), "16",EOMONTH([End15,1]) ), "Leaving",IF(__Today > [End15] && __Today <=[16],1,0) ) RETURN COUNTROWS(FILTER(__Table,[Leaving]=1)) - Anonymous6 years ago
Hi Anonymous,
I'd like to suggest you take a look at following link about hr employee analytic if it meet your requirement:
HR Data - Slowly Changing Dimensions
Regards,
Xiaoxin Sheng
amitchandak
Super User
6 years agoAnonymous , not very clear. if customer is inactive if he not coming for last 16 month
example - Measures
purchased in last 16 month
Rolling 16 Sales = CALCULATE(sum(Retail[Qty]),DATESINPERIOD('Date'[Date],max('Date'[Date]),-3,MONTH))
not purchsed in last 16 month
Rolling 16 Not Sold = if(CALCULATE(sum(Retail[Qty]),DATESINPERIOD('Date'[Date],max('Date'[Date]),-3,MONTH)) +0>0,blank(),1)