Forum Discussion
Churn with Dax
I would like to see the number of customers lost each year by comparing the number of active customers from the last 12 months who were already active the 12 months before. So you need to identify the customer IDs of 2022 for example and check which ones returned in 2023, and have this data over 24 floating months. So for example for January: Look at customers who came between January 31, 2022 and January 31, 2023 who returned between February 1, 2023 and January 31, 2024.
Can you help me?
thanks
7 Replies
- lbendlin
Super User
yes, DAX has just the right command for that - EXCEPT.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- EdMbuFrequent Visitor
id customer last_interaction_date 915$100 jeudi 10 décembre 2015 915$1006 vendredi 10 janvier 2003 915$1008 lundi 18 juillet 2016 915$1019 mardi 16 décembre 2003 915$1023 mardi 10 mars 2020 915$1029 lundi 12 septembre 2005 915$1032 mardi 8 mai 2007 915$1036 vendredi 4 août 2006 915$1037 mercredi 4 avril 2007 915$104 lundi 2 juillet 2012 915$1042 mercredi 27 octobre 2021 915$1043 lundi 28 août 2006 915$1053 vendredi 31 janvier 2003 915$1054 lundi 3 mars 2003 915$1060 mercredi 25 août 2010 915$1062 jeudi 6 février 2003 915$1065 lundi 1 juillet 2013 915$1067 jeudi 13 janvier 2022 915$1068 lundi 27 novembre 2017 915$1073 jeudi 12 avril 2018 915$1074 mardi 12 septembre 2017 915$1075 lundi 23 septembre 2013 915$1076 vendredi 21 novembre 2014 915$1082 jeudi 17 novembre 2022 915$1083 samedi 15 février 2003 - lbendlin
Super User
Sorry, your sample data is insufficient for that
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
- EdMbuFrequent Visitor
- lbendlin
Super User
That's a screenshot. Please provide data in usable format.
- EdMbuFrequent Visitor
I want to see in the last column if a client id is inactive or if it is a new client. The date table starts from April 2021 to frebruary 2024. thanks