I have 2 properties: Created (date), and Cancel date (date). I would like to extract if customers stayed a customer with us for more than 30 days (they got a 30-day free trial, and we want to see only the people who signed up and actually stayed and paid for the subscription).
Hi Janine, Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
You can do this with a Custom Property that calculates the number of days between Created and Cancel date, then use it in reports/cohorts. Mixpanel supports computing date differences (e.g. “days active since registration”) using custom properties and the TODAY() function for ongoing users. [Custom properties]
1. Create a custom property: “Days as customer”
In Custom Properties, define something conceptually like: - If Cancel date exists: days_between(Created, Cancel date)
- If Cancel date is empty (still active): days_between(Created, TODAY())The docs don’t show the exact function syntax for days_between, but they explicitly state you can “compute the date/time difference between two date properties” and use TODAY() to find the difference between a date property and the current date/time. [Custom properties]
2. Build a cohort of “Stayed > 30 days”
Once that custom property is available on users: 1. Go to Users → Cohorts and create a new cohort. [Cohorts]
2. Add filter: Days as customer greater than 30.This cohort now represents users who signed up and either: - Canceled after more than 30 days, or
- Are still active and have already been customers for more than 30 days.You can then: - Use this cohort in Retention, Funnels, Insights, etc. [Define cohorts]
- Or export/sync it to other tools.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
You need to create a custom event property and not user property
