Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Cohort Analysis To Calculate How Many Distinct Customers Retained Every Month

Hi Everyone, 

I am trying to do Cohort Analysis on Customers who are retained in subsequent months.Please see the below excel which needs to be created in Power BI

 

Customers (Count)      
         
YearMonthInitial1M2M3M4M5M6M
201571,648822734690640610596
201581,498776711656626610 
201591,515787657643620  
2015101,498721659638   
2015111,377717682    
2015121,398741     
201611,467      

 

If my distinct Customers in July 2015 are 1,648, only 822 are retained out of those 1,648  after 1M(1month) and so on and so forth.

Similarly for subsequent months distinct customers are calculated and further calulations of retention are done based on the Initial Data.

 

Can someone please help me with the DAX functions and the method to proceed further.

 

Thanks,

Kanchan

9 REPLIES 9
MAAbdullah_47
Helper V
Helper V

Hi Dear

 

Where can I found the answer of your question?

https://community.powerbi.com/t5/Quick-Measures-Gallery/Patient-Cohort-AND-Slicer/m-p/391883#M130


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

If you could share the sample data.
But this will be the steps you follow.

1. Calculate the OrderPeriod in yyyy-mm format for each transaction ,

YEAR(Query1[entryDate])&VALUE(FORMAT(MONTH(Query1[entryDate]),"00"))
2. Calculate the Cohort Group for that transaction 
FORMAT(CALCULATE(MIN(Query1[entryDate]),
ALLEXCEPT(Query1,Query1[custId])),"yyyy-mm").
 
Then use summarize DAX function to get total customers 
 
 
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
suebayes
Resolver I
Resolver I

Hi @Anonymous 

How did you progress with this, am looking at doing the same?

sue

v-yuta-msft
Community Support
Community Support

@Anonymous ,


If my distinct Customers in July 2015 are 1,648, only 822 are retained out of those 1,648  after 1M(1month) and so on and so forth.

Similarly for subsequent months distinct customers are calculated and further calulations of retention are done based on the Initial Data.

 

Can someone please help me with the DAX functions and the method to proceed further.


Actually you have clarified your table structure very well. In addtion would you please tell me what's the expected value? Are you trying to calculate come percentage like increase rate or decrease rate? To be general, you may refer to quick measure about how to create measures using DAX function in power bi to achieve what you want.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-yuta-msft  The table shown in my post is what my output should be. I have distinct customernames for past 6 months(Months are selected dynamically based on current month).

 

I checked quick measures also but could not find anything that could be used directly for this scenario. This is a quite complicated scenario. 

  Please let me know if you know what functions could be used.

 

Thanks!

Kanchan

Greg_Deckler
Super User
Super User

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Note, Notifications are not working right now, so if you update this with data, please send me a Private message.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler  
I'm Interested in (Cohort analysis post) but I didn't understand your answer completely, where can I found the complete article (post) answer regarding cohort analysis?

 

 

Anonymous
Not applicable

@Greg_Deckler  Thank you for sharing the link.

I will make sure I follow all these basic rules while posting any questions in future 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.