Forum Discussion
Customer Retention Dax Measure: Memory Problems
Anonymous , based on what I got from your logic
Can you try a complete measure approach with date table
All Customer = count(Invoice[Customer ID]) // Not taking distinct count as Only need to know has it come
Customer Came in last 12 Month= CALCULATE(count(Invoice[Customer ID]),DATESINPERIOD('Date'[Date ],MAX(Invoice[Invoice paid Date]),-12,MONTH)) // What gor from you script those who do not came for 12 month asre inactive, you can changes
lost in last 12 Month = sumx(values(Invoice[Customer ID]),if(isblank([Customer Came in last 12 Month]) && not(isblank([All Customer])),1,0)) // blank in last 12 month and have a record in invoice.
See if this can give better performance and the same answer
I have done same here for the month - Pbix available in the blog -https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
Appreciate your Kudos.