I want to generate a metric that does the following:
look at users who have activated on each day of the last week, e.g., day 1, day 2, .... day 7 (today)
on each day generate a percentage: [all the users who released at least 20 hours in the last week / all users who activated in the last week
How can I set this up?
Hi Phil C., 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 set up this metric in Mixpanel, you’ll need to use a combination of cohort creation, property aggregation, and formulas in Insights. Here’s how you can approach it based on the available documentation:
Step 1: Identify Users Who Activated Each Day
- Create a cohort for each day in the last week, e.g., “Users who activated on Day 1,” “Day 2,” etc. - You can do this using the Cohort Builder by filtering users based on the activation event date (e.g., “activated” event where the event date is equal to each specific day in the last week) Creating Cohorts.
Step 2: Calculate “Released at Least 20 Hours in the Last Week”
- Define a property (e.g., “hours_released”) that tracks the number of hours released by a user. - Create a cohort of users who have “hours_released” ≥ 20 in the last 7 days. You can do this in the Cohort Builder by setting the filter: “users where hours_released in the last 7 days is greater than or equal to 20” Creating Cohorts.
Step 3: Calculate the Percentage for Each Day
- For each day’s activation cohort, use Insights to: 1. Count the number of users in the activation cohort who are also in the “released at least 20 hours” cohort (intersection). 2. Divide by the total number of users who activated on that day. - In Insights, you can use the Formula metric to calculate this percentage:
```LBKS Use the Formula feature in Insights to set this up [Formulas in Insights](https://docs.mixpanel.com/docs/reports/insights#advanced).
Step 4: Visualize the Results
- Use a line or bar chart in Insights to display the percentage for each day of the last week Chart Types.---Note: - You may need to create temporary or saved cohorts for each day, and use the intersection logic in the cohort builder or via filters in Insights. - If your “hours released” is tracked as an event property, ensure you use property sum/aggregation in your cohort or Insights setup.If you need to automate this for every day in the last week, you may need to repeat the cohort creation and formula steps for each day, as Mixpanel does not natively support dynamic cohort generation for “activated on each day” in a single step.If you need more granular guidance (e.g., exact UI steps or code), please specify your data structure or clarify if “released at least 20 hours” is an event or a property.---References: - Creating Cohorts - Formulas in Insights - Chart Types in Insights
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.