Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
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" )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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!