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
ewu
Helper I
Helper I

How to do cohort analysis - same starting point with relative time period?

Could someone please help me? Left table is what I have, and the right 2 tables are what I need.

Thanks a lot!

 

ewu_0-1679171529318.png

 

1 ACCEPTED SOLUTION

Hi, Greg,

 

The 2nd link above was helpful but still not enough for me. The challenges are:

 

1. Customer starting dates are in another table which is properly linked to the left table in my original screenshot above. That is, the left table in the screenshot only starts from a recent month while many more historical sales data are to be input.  I tried "related" with "datediff", but couldn't get the age.

 

2. Even if I do get the customer age, how do I pupulate a table that looks like those in the right table in my screenshot above? The columns headers should read "1st month from onboarding, 2nd month from onboarding,.... 50th month from onboarding". 

 

Could you please help? Thanks a lot. @Greg_Deckler 

 

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

@ewu Try this: Patient Cohort (AND Slicer) - Microsoft Power BI Community or this: Customer Retention Part 3: Period Of Stay – Cohort... - Microsoft Power BI Community


@ 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...

Thanks Greg. The 2nd link is quite similar to what I wanted. Let me try to do it the same way first these a few days. @Greg_Deckler 

Hi, Greg,

 

The 2nd link above was helpful but still not enough for me. The challenges are:

 

1. Customer starting dates are in another table which is properly linked to the left table in my original screenshot above. That is, the left table in the screenshot only starts from a recent month while many more historical sales data are to be input.  I tried "related" with "datediff", but couldn't get the age.

 

2. Even if I do get the customer age, how do I pupulate a table that looks like those in the right table in my screenshot above? The columns headers should read "1st month from onboarding, 2nd month from onboarding,.... 50th month from onboarding". 

 

Could you please help? Thanks a lot. @Greg_Deckler 

 

No worries. My mistake. Anything minor could kill everything. 

Unfortuantely I went through the above videos and a couple more, but still cannot get the final results. One of the challenges is I am not sure what to do with my newly created generateseries table. Here are the 2 tables I have now:

ewu_0-1680051142166.png

Below is what I want:

ewu_1-1680051236363.png

Could someone please help? @Greg_Deckler 

 

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.

Top Solution Authors