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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

How to Calculate Retention on a monthly base

Hello dears, I want to calculate the retention rate on a monthly basis & need to know how to calculate the number of users who has orders in Aug & has orders in Sep I have searched on the community & tried some of the suggested solutions, but It does not work with my data, here is

Asmaaelsheikh_0-1726332624306.png

 

dummy data Appreciate your support

6 REPLIES 6
Selva-Salimi
Super User
Super User

Hi @Asmaa-elsheikh 

 

you can follow these steps:

1. create a column which shows and order on your date column based on month ( better to write this column column which is in this format "YYYYMM" assume that we call this column year_month) :

   monthly_order = calculate (count(year_month) , filter (your_table , year_month <= earlier (year_month))

2. use this monthly_order column in your measure as follows:

measure retention_rate := 

 var current_users = summarize(your_table , ID)

 var previous_users= summarize (filter(all(your_table) , monthly_order =selectedvalue(monthly_order)-1) , ID)

 return

 countrows(intersect(current_users , previous_users))

 

If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly. 

Aasif
New Member

  • Change the date to month using power query. Then use group by option.

Thanks @Aasif, but this solution will return the count of active users each month not the retained users 

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Thanks @lbendlin, here is the data as table format

 

OrdersIDdate
4017/31/2024
11

8/26/2024

412024-08-31
3327/31/2024
3128/26/2024
422024-08-31
137/31/2024
3238/26/2024
3532024-08-31
147/31/2024
448/26/2024
142024-08-31
4017/31/2024
118/26/2024
412024-08-31
3327/31/2024
3128/26/2024
422024-08-31
137/31/2024
3238/26/2024
3532024-08-31
147/31/2024
448/26/2024
142024-08-31
4017/31/2024
118/26/2024
412024-08-31
3327/31/2024
3128/26/2024
422024-08-31
137/31/2024

2024-09-31, really ?

lbendlin_0-1726403954891.png

 

Retention is 100% for all IDs.  Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors