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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ivancespedesl
Helper I
Helper I

Client status over time

Hi,

 

I would like to get a measure that could tell me if a customer 'deserted' (changing his status from S to N comparing two periods). I tried using one of the solutions in another similar question but it didnt work. My data is quite simple. For this matter I only need to use Date, User ID, Status.

Thanks in advance,

 

IC

2 REPLIES 2
dax
Community Support
Community Support

Hi ivancespedesl,

 

Based on your description, I didn’t know the logic of “customer 'deserted'”, how to determine the customer 'deserted'? If possible, could you please explain this in details? If you want to compare “S” and “N” ‘s period(calculate date difference), if date difference >10, then show “yes” else show “no” You could try to use below measure to see whether it works or not

 

Measure 10 =
VAR t =
    CALCULATE (
        MIN ( Table5[date] ),
        FILTER (
            ( Table5 ),
            Table5[status] = "n"
                && Table5[userid] = MIN ( Table5[userid] )
        )
    )
VAR d =
    CALCULATE (
        MIN ( Table5[date] ),
        FILTER (
            ( Table5 ),
            Table5[status] = "s"
                && Table5[userid] = MIN ( Table5[userid] )
        )
    )
RETURN
    IF ( DATEDIFF ( t, d, DAY ) <= 10, "yes", "no" )

823.png

Best Regards,

Zoe Zhi

 

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

Hi,

 

To clarify the matter let's explain the desired result:

 

IF Customer_Status on the last period was S and now it is S, 'Active'

IF Customer_Status on the last period was N and now it is N, 'Inactive'

IF Customer_Status on the last period was S and now it is N, 'Deserted'

IF Customer_Status on the last period was N and now it is S, 'Reactivated'

 

This tracking must be done through the Customer ID that remains constant with the client over time.

 

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 Solution Authors
Top Kudoed Authors