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
Johann1978
Regular Visitor

Dynamic Retention Calculation

Hoping someone can help. I have been working to convert this excel table into dax calculations in Power BI, but have hit a bit of a wall. The calculation looks at the number users created by month and the number who churn by the number of months active. I am hoping someone might have created similar views in BI that I can leverage the code. 

 

Thanks in advance,

 

Below are a few screen shots of the dataset in Excel.

 

Johann1978_0-1626389749529.png

 Retention
Same Month        8.9%
M+1     15.1%
M+2     18.1%
M+3     21.4%
M+4     24.1%
M+5     26.4%
M+6     28.5%
M+7     30.3%
M+8     31.7%
M+9     33.2%
M+10     34.7%
M+11     36.1%
M+12     37.4%
M+13     38.4%
M+14     38.2%
M+15     38.6%

Johann1978_1-1626389877152.png

Johann1978_2-1626390226968.png

 

2 REPLIES 2
amitchandak
Super User
Super User

Hello,

 

So what I am struggling with is the cummulative aspect of the calculation. I'm sure someone will have an easy way to do this. The table below is similar to above just looking at attrition instea of retention.

 

The second table shows the cummulative attrition by vintage and is calculated by the formula below. I just can't figure out how to translate it into DAX 

 

Month+2 =SUM(Rows M0-M2 columns Jan (2020-Feb2021)/Sum(row Total Columns Jan 2020-Feb2021)

Month+5 =Sum (Rows M0-M5 columns Jan (2020-Nov 2020))/Sum(Total Columns Jan 2020-Nov2020)

Its essentially looking for the last amount for each vintage and summing all of the values for each vintage that are less than or equal to that month and dividing that by the total amounts for the max month for that vintage. 

 

Months ActiveJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuaryFebruaryMarchApril
Currently Active29,43525,39527,15726,06833,42541,09833,40238,27140,98225,62726,29738,96533,56335,07550,07933,503
04,1033,6743,8584,0154,3915,9854,4205,3905,8012,9052,8803,7223,4213,7894,9482,885
12,5751,9172,0722,7293,0673,8032,7944,1694,2212,0131,9932,5352,5183,5983,505 
21,4049611,2071,3241,5602,0951,5931,6481,9399691,0141,7591,1901,204  
31,3079671,0481,4142,0422,3751,9631,6741,6621,2471,1261,3691,276   
48466809571,3961,6051,8911,3341,5131,9649248991,198    
57801,0331,1861,1171,2571,4499481,1991,206739689     
 40,45034,62737,48538,06347,34758,69646,45453,86457,77534,42434,89849,54841,96843,66658,53236,388
                 
 Attrition               
Same Month        8.8%               
M+1     14.9%               
M+2     17.9%               
M+3     21.0%               
M+4     23.7%               
M+5     26.2%               

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