how do I create a bar chart that buckets users by the number of days since their last session
Hi Elise S., 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
The knowledge sources don’t describe a built‑in way in the UI to directly bucket users by “days since last session,” so the steps below are inferred from related capabilities; there may be gaps you’ll need to fill in your project.
Conceptually, you need a numeric property on the user that represents “days since last session,” then bucket that property in a bar chart:
Get a “days since last session” property
The docs describe behavioral / computed properties that can turn user behavior into properties usable in filters and breakdowns (e.g. frequency per user, aggregate property per user). [Computed props]
However, the sources do not explicitly mention a “time since last event/session” computed property, so I can’t confirm that this exact metric is available out‑of‑the‑box.
If you already have a user profile property like last_session_date or last_seen, you’d need to transform it into “days since last session” (e.g. via ETL or a custom process); this transformation is not documented in the provided sources.
Bucket that numeric property
In Insights, you can bucket high‑cardinality numeric segments using Custom Buckets. [Insights basic; Custom bucketing]
Once you have a numeric “days since last session” property:
Open an Insights report.
Use a Profile metric (e.g. “Count of users”). [Insights metrics]
Add a breakdown by your “days since last session” property.
In the breakdown header, open the overflow menu (…) and choose Custom Buckets.
Define even or varied ranges (e.g. 0–3, 4–7, 8–14, 15–30 days).
Switch the visualization to Bar chart.
Alternative: JQL bucketing (advanced)
If you compute “days since last session” via JQL, you can bucket numeric values with mixpanel.numeric_bucket() and then visualize the result. [numeric_bucket]
The docs show numeric bucketing for age and event counts, but not specifically for “days since last session.”
Because the docs provided don’t show a ready‑made “days since last session” metric, the missing piece is how you generate that property in your own data. Once you have it as a numeric property, the bar‑chart bucketing itself is supported via Insights breakdowns + Custom Buckets as described above.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
