I have created a report that shows a sum of session duration in a particular timeframe. But I want to show a sum of session duration divided by the active users in that same timeframe. How do I do that?
Hi Moritz H., 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
To show the sum of session duration divided by the number of active users in a given timeframe (i.e., average session duration per active user), you can use Mixpanel’s Formula feature in Insights reports. Here’s how you can achieve this: 1. Create two metrics in your report:
- Sum of Session Duration: Use the “Aggregate Property” measurement to sum the “Session Duration (seconds)” property for your sessions.
- Active Users: Use the “Unique Users” measurement for the same timeframe.2. Add a Formula:
- Click the Metrics button and select Formula.
- Assign variable names to your two metrics (e.g., A for sum of session duration, B for unique users).
- In the formula field, enter A / B to divide the total session duration by the number of active users.
- If you want the result in minutes instead of seconds, use (A / B) / 60.This will give you the average session duration per active user for the selected timeframe.Reference:
Mixpanel documentation specifically describes using formulas to divide one metric by another, such as dividing session duration by 60 to convert to minutes, and using aggregate property measurements in combination with formulas to achieve per-user calculations. For more details, see the FAQ on session duration and Formulas in Insights.If you need to see a step-by-step example, refer to the linked FAQ and Insights documentation above.
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.
