I want to calculate a KPI that shows the average number of item_viewed events per user per day, but across a 30-day date range
Hi Aviv M., 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 calculate a KPI showing the average number of item_viewed events per user per day across a 30-day date range in Mixpanel, you should use the Insights report with the following setup: 1. Event Selection: Choose the item_viewed event as your metric. 2. Measurement: Select "Frequency per User" to get the number of item_viewed events per user. 3. Aggregation: Set the aggregation to "Average" to get the average number of item_viewed events per user. 4. Date Range: Set the date range to the last 30 days. 5. Interval: Set the interval to "day" to view the metric per day.This setup will give you a daily trend of the average number of item_viewed events per user, calculated for each day in the 30-day window. If you want a single KPI for the whole period, you can aggregate the results further (e.g., take the overall average across all days).How it works in Mixpanel: - "Frequency per User" calculates the number of events per user, and the "Average" aggregation gives you the mean across all users for each day. - The date range selector allows you to specify the 30-day window you want to analyze. - You can visualize this as a line chart to see trends or as a single value for the overall average.Reference: You can find more details about these measurement and aggregation options in the Mixpanel documentation: Insights: Measurements, Additional Aggregation Option Examples, and Date Range.If you need to do this via the API, you can use the segmentation endpoint with the average function, specifying the event, date range, and appropriate parameters to get the average per day: Segmentation Query - Average.
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.
