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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
noyrotbart
Frequent Visitor

Calculate attrition

Suppose I have a list with clients and the months they have been onboard. The clients are either active or inactive, and I want to make a chart going from 0 months to Max months, where at month i I will have the percentile of clients that "made it" to i months without quitting. So far, I have been using R and 12 measures* to produce this chart. 

Note that this chart can easily be made with an auxiliary table, but then I can not filter on my data in the report.

Anyone else stumbled across something like that?

Last note- I recently saw the whatif trick, which allows to perform * with a parameter, but this can not be transfered to R, sadly.
Attrition.jpg

*The measures are of the sort 
i month attrition = CALCULATE(COUNTROWS('Gifts'), FILTER('Gifts','Gifts'[months onboard]>=i)) / CALCULATE(COUNTROWS('Gifts'), FILTER('Gifts',not ('Gifts'[IsActive]= TRUE() && ('Gifts'[Months onboard]<i))

 

1 REPLY 1
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @noyrotbart,

 

Can you share a sample in TEXT mode? The .pbix file would be great. I think DAX formula is enough.

 

Best Regards!

Dale

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.