Forum Discussion
Customer Retention Dax Measure: Memory Problems
Anonymous Can you post sample data as text? I have some performance optimization tips for DAX:
https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-1/ba-p/976275
https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-2/ba-p/976813
https://maqsoftware.com/expertise/powerbi/dax-best-practices
https://www.sqlgene.com/2019/09/27/a-comprehensive-guide-to-power-bi-performance-tuning/
https://www.sqlbi.com/tv/optimizing-analyzing-dax-query-plans-sqlbits-xii/
Sorry for the link spam but your question as currently put is hard to answer definitely. I would use DISTINCT instead of VALUES in that formula. Can you also post your formula for returning customers?
Also, https://community.powerbi.com/t5/Quick-Measures-Gallery/New-and-Returning-Customers/m-p/168297#M13
Finally, I have a version in DAX Cookbook, Chapter 6, Recipe 2. You can see the DAX here: https://github.com/gdeckler/DAXCookbook