I want do a weekly average to get for each day of the day the average number of all events ingested within a time period
Hi event, 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 the average number of all events ingested for each day of the week within a time period in Mixpanel, you can use the following approach: 1. Use the Query API: The /events
endpoint allows you to get aggregate event counts (total, unique, or average) for a set of events over days, weeks, or months. You can specify the type
parameter as "average"
to get average data, and set unit
to "day"
to get daily granularity. You will need to provide the list of events you want to include, or all events if you want a complete average.2. Parameters Example:
- type=average
- unit=day
- from_date
and to_date
to specify your time period
- event
as a JSON array of all event names you want to include Example request:
```LBKSLBKS3. **Interpreting Results**: The response will include, for each event, the average number per day. You can then aggregate these averages for each day of the week (Monday, Tuesday, etc.) across your time period.LBKS4. **Grouping by Day of Week**: Mixpanel’s API returns data by date, so you will need to post-process the results to group by the day of the week (e.g., sum or average all Mondays, all Tuesdays, etc.) to get the average per day of the week.LBKS**Note:** The API does not natively group by day of the week, so this last step must be done outside Mixpanel, such as in a spreadsheet or script.LBKS**References:**
- [Query API - Aggregate Event Counts](https://raw.githubusercontent.com/mixpanel/docs/main/openapi/src/query.openapi.yaml)
- [Query API - Average Events](https://github.com/mixpanel/docs/blob/main/reference/Query%20API/segmentation/segmentation-query-average.md)LBKSIf you want to do this in the Mixpanel UI, you can use the Insights report:
- Select all relevant events.
- Set the time interval to "day".
- Use the "Average" measurement if available.
- Export the data and group by day of week externally if needed.LBKSLet me know if you need a sample API request or further details!
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.
Let me check the knowledge base for you again. One moment! 📚
To achieve a weekly average of all events ingested for each day of the week using the Insights report in Mixpanel, follow these steps: 1. Create an Insights Report: Go to the Insights report in Mixpanel.2. Select Events: Add the events you want to analyze. You can select multiple events to include all relevant ones in your analysis. This is done by clicking “Select Metrics” and choosing your events under “Events” in the metrics menu. This creates a simple behavior metric for each event you select Quick Start.3. Set the Time Interval: Change the time interval to “Day” so that the report shows data for each day within your selected time period.4. Choose Measurement: By default, Insights measures unique users, but you can change this to “Total Events” or “Average” as needed. Click on the measurement dropdown (usually labeled “Unique Users”) and select “Total Events” or “Average” Measurements.5. Set the Date Range: Use the date range selector to specify the time period you want to analyze. You can choose a custom range or use presets like “Last 30 days” Date Range.6. Export and Post-process (if needed): Mixpanel’s Insights report will show you the daily totals or averages for each event. To get the average per day of the week (e.g., average for all Mondays, all Tuesdays, etc.), you will need to export the data and group it by day of the week externally, as Mixpanel does not natively group by day of week in the UI.Summary: Mixpanel Insights allows you to view daily event averages, but grouping by day of the week (Monday, Tuesday, etc.) must be done outside Mixpanel after exporting the data. There is no built-in grouping by day of week in the Insights UI based on the available documentation Quick Start Measurements.If you need more advanced grouping or automation, consider using the Query API and post-processing the results as described earlier.
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.