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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
AbdulHinan
New Member

Dax function

Hi,

i have only user id and the date 

and i want a Dax function to find 

Insights on the Dormant Users, Repeating Users and Resurrected Users for a month Dormant – Inactive for 30 days Resurrected – Dormant Previous Month but now active Repeating - Active Last Month and Still Active

2 REPLIES 2
Anonymous
Not applicable

Hi  @AbdulHinan ,

According to your description, You want to group by [user_id] and determine the type of user by [Date]: (1)Dormant Users: No activity until today 30 days ago (2) Resurrected Users: There was no activity 30 days ago, but there is activity today (3) Repeating Users: There was activity 30 days ago, and there is activity today .Right?

Here are the steps you can follow:

(1)This is my test date:

vyangliumsft_0-1662350861871.png

(2)We can create a new column,then we can meet your need:  “Type”

Type = 
var _last_30_days= COUNTROWS( FILTER( 'Test',  'Test'[Date] < TODAY() && 'Test'[Date] > TODAY()-30 && 'Test'[user_id]=EARLIER(Test[user_id])))
var _today= COUNTROWS( FILTER('Test','Test'[Date]=TODAY() && 'Test'[user_id]=EARLIER('Test'[user_id])))
return
IF(_last_30_days =BLANK() , IF( _today =BLANK() ,"Dormant" , "Resurrected") , IF(_today = BLANK(),BLANK(),"Repeating")
)

(3) The result is as follows :

vyangliumsft_1-1662350861874.png

If this method does not meet your needs, you can provide us your sample data without sensitive data, or detailed input and output sample data, so that we can better help for you.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@AbdulHinan , Various version of customer Retention 

 

refer if these can help

 

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retenti...

 

Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://www.youtube.com/watch?v=W4EF1f_k6iY

 

Customer Retention Part 5: LTD Vs Period Retention
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retentio...

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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