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
bigfun
Helper I
Helper I

Monthly Retention Numbers & Date Relationships

Alright... So I am trying to have a running sum of newUsers by month so that I can calculate a retention rate.

bigfun_3-1645726388050.png

bigfun_0-1645726069287.png

 

 

I have created a Date Table, and I thought that I created the correct relationships between the date table, and data table.

bigfun_1-1645726137266.png

bigfun_2-1645726164444.png

 

 

Link to the .pbix

 

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

https://drive.google.com/file/d/1gLauPrbVdrhqJaBo3mun3wB7LfHYjegz/view?usp=sharing 

 

Hello:

 

I put in some measures in your Retention Table that shows some ways to accumulate totals. On your report page a replicated the matrix so you can scroll down and see the difference at end of month or year. 

 

Usually, your retention table might have more than one entry per month, multiple entries and even multiple entries per day. When that get's joined to your Date table your relationship will be fine with Dates on the ONE side and the data on the MANY side. It's OK now ,it's a one to one relationship which will work but isn't the type of relationship we typically strive for. 

 

I did an example of retention rate to show you the divide function that you may want to change to other fields.

 

I put in an extra Data Table in case you would like more flexibility around Time Intell functions.

 

I hope this helps!

View solution in original post

5 REPLIES 5
Whitewater100
Solution Sage
Solution Sage

https://drive.google.com/file/d/1gLauPrbVdrhqJaBo3mun3wB7LfHYjegz/view?usp=sharing 

 

Hello:

 

I put in some measures in your Retention Table that shows some ways to accumulate totals. On your report page a replicated the matrix so you can scroll down and see the difference at end of month or year. 

 

Usually, your retention table might have more than one entry per month, multiple entries and even multiple entries per day. When that get's joined to your Date table your relationship will be fine with Dates on the ONE side and the data on the MANY side. It's OK now ,it's a one to one relationship which will work but isn't the type of relationship we typically strive for. 

 

I did an example of retention rate to show you the divide function that you may want to change to other fields.

 

I put in an extra Data Table in case you would like more flexibility around Time Intell functions.

 

I hope this helps!

That is super helpful thank you so much... where was I going wrong initally that was causing the MTD to not accumulate correctly?

Hi:

It looks like your MTD was summing your New Users. (Same figures for New & Total) Since your table was set up as monthly and there is just one figure/month it was behaving correctly. Generally, if you can do this as a measure it's way better for your model, performance and practice. The Calc Columns should be used sparingly and when you need a new filed to sort on for example.

 

Whitewater100_0-1645735033570.png

 

Whitewater100
Solution Sage
Solution Sage

Hi:

Your Date table should have all unqiue and continuous dates and no bi-directional filter should be needed.

 

You can use Month-Year Column from your date table and create a visual instead of calc column. If you want the cumulative amount to restart each year you can use TOTALYTD function. Otherwsie

 

Cumulative New Users = CALCULATE(Sum(Retention_Test[New Users], 

                                        FILTER(ALLSELECTED('Calendar[Dates]), 
                                         Calendar[Date] <= MAX(Calendar[Date])
)

This is if you want a cumulative total that continues to grow across years.

Jan 2021  100

Feb 2021 150

...

Dec 2021 300

Jan 2022 350


 

Thank you for the quick reply... so are saying that I should delete the (many to 1)relationship I set up between the Calendar - Date & Retention_Test Date?

 

bigfun_1-1645728033984.png

 

Turing the relationship inactive gave me the same results as I posted above, and with the relationship active, it now sums the full time period in each row.

 

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