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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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!:
Mastering Power BI 2nd Edition

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors