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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Vlasz
Advocate I
Advocate I

Advanced DAX Matrix Total

Hello Community!

 

I am struggling with a writing the DAX to correctly calculate a Retention % at the Total level. 
I believe a picture will best help me to explain my scenario.

The below tables represent customers acquired in each month, and how many months they remain active until dropping.

The goal is to be able to further visualize these %'s over time to track how various efforts can improve Customer Retention.
In order to do so, I need to improve how the Total Retention % for each MonthNumber (columns) is being calculated.

The issue at hand is represented in orange below.
In the orange circles, we can see that our 17mo Retention % is currently being tracked at 9%, which is the result of 944/10,050.  
The desired inputs for Month 17 Retention is circled in red - 944 / 1,915 or 49%.

Desired Inputs for Month 16 Retention are circled in Blue, Month 15 in green.



Retention Snippet.png


Underlying data shown below. Each subscription has a "Months Active" value calculated in SQL using a datediff between Active and Drop date. Helper table is used to account for Start Months that may have gaps.

Vlasz_0-1726172835904.png

 



1 REPLY 1
gmsamborn
Super User
Super User

I would like to help but I'm a little unclear about your requirements.

 

Can you provide the following?

 

1)  Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

 

2) Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

3) Please explain how you would expect to get from step 1 to 2.

 

4) If possible, please show your past attempts at a solution.

 

 

A .pbix file with sample data would be best.



Proud to be a Super User!

daxformatter.com makes life EASIER!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.