Forum Discussion

EdMbu's avatar
EdMbu
Frequent Visitor
2 years ago

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

  • 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

    • EdMbu's avatar
      EdMbu
      Frequent Visitor
       
      id customerlast_interaction_date 
      915$100jeudi 10 décembre 2015 
      915$1006vendredi 10 janvier 2003 
      915$1008lundi 18 juillet 2016 
      915$1019mardi 16 décembre 2003 
      915$1023mardi 10 mars 2020 
      915$1029lundi 12 septembre 2005 
      915$1032mardi 8 mai 2007 
      915$1036vendredi 4 août 2006 
      915$1037mercredi 4 avril 2007 
      915$104lundi 2 juillet 2012 
      915$1042mercredi 27 octobre 2021 
      915$1043lundi 28 août 2006 
      915$1053vendredi 31 janvier 2003 
      915$1054lundi 3 mars 2003 
      915$1060mercredi 25 août 2010 
      915$1062jeudi 6 février 2003 
      915$1065lundi 1 juillet 2013 
      915$1067jeudi 13 janvier 2022 
      915$1068lundi 27 novembre 2017 
      915$1073jeudi 12 avril 2018 
      915$1074mardi 12 septembre 2017 
      915$1075lundi 23 septembre 2013 
      915$1076vendredi 21 novembre 2014 
      915$1082jeudi 17 novembre 2022 
      915$1083samedi 15 février 2003 
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper 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.

  • EdMbu's avatar
    EdMbu
    Frequent Visitor

    lbendlin  so I have a list of customers, if the customers do not order for a year they become an inactive customer. example if the customer had an order in 2022 and did not place an order in 2023, it becomes inactive. thanks

    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper User

      That's a screenshot. Please provide data in usable format.

  • EdMbu's avatar
    EdMbu
    Frequent 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