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
Oleksii
Frequent Visitor

Retention Rate per Day given Customer Active and Eligible Days

Hi All!

I have a dataset of customers, how long have they been using our Subscription (Active Days) and how long ago they have taken that Subscription (Eligible Days)

Basically Active = 1 Eligible = 10 means that Customer has subscribed 10 days ago and Canseled on his first day.

 

Customer_IDActive DaysEligible Days
1110
21050
3720
41515

 

Is there a way I can plot a chart like this?

e.g.  - whats the % of customers that have retained each day after Subscription was taken, regardless of the actual Start Date?

 

 

Retention Curve.PNG

 

Thanks in advance!

1 ACCEPTED SOLUTION

OK, I came up with the following. Create a table like this:

Days = GENERATESERIES(1,30,1)

And then a measure like this:

Measure = 
    VAR __CurrentDay = MAX('Days'[Value])
    VAR __All = COUNTROWS('Table')
    VAR __Survivors = COUNTROWS(FILTER('Table',[Active Days] + 1 > __CurrentDay))
RETURN
    DIVIDE(__Survivors,__All,0)

May need some tweaking. No reason it should not work with filters or legends. PBIX is attached.

 

 

 


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

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

I think i can solve this problem provided the following columns are present in your dataset - ID, Date of subscription and Date of churn.

Please share your dataset.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Super User
Super User

So, for the sample data provided, which day in your axis would each of those 4 items drop off?


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

Each of the customers drop of at their "Active Days" +1
The chart would look like:

Day 1 - 100% - 4 out of 4 Customers survive day 1

Day 2 - 75% - first customer dropped off (3 / 4 = 75%)

Day 3 - 75% - no changes

...

Day 7 - 75% - no changes

Day 8 - 50% - one more customer dropped off (2 / 4 = 50%)

and so on

 

 

 

 

 

Greg_Deckler
Super User
Super User

Kind of looks like a Kaplan Meier Survival Curve:

https://community.powerbi.com/t5/Community-Blog/Kaplan-Meier-Survival-Curves-with-Power-BI-Part-1/ba...

 


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

I understand this approach, but it's a bit now that I'm looking for.

 

I'm my case my data table also has all kinds of User Attributes, and I would love to use those Attributes as filters / legend on the "survival" chart.

OK, I came up with the following. Create a table like this:

Days = GENERATESERIES(1,30,1)

And then a measure like this:

Measure = 
    VAR __CurrentDay = MAX('Days'[Value])
    VAR __All = COUNTROWS('Table')
    VAR __Survivors = COUNTROWS(FILTER('Table',[Active Days] + 1 > __CurrentDay))
RETURN
    DIVIDE(__Survivors,__All,0)

May need some tweaking. No reason it should not work with filters or legends. PBIX is attached.

 

 

 


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

This is great!
Thank you so much!

amitchandak
Super User
Super User

@Oleksii , Not sure I got it. But you can plot active days on-axis.

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.