Is it possible use a filter to count only events from a custom event up to a specific day and do not count subsequent from that day ?
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
Yes, it is possible to count only events from a custom event up to a specific day (and not include subsequent events after that day) by using a date filter in your query. In Mixpanel, both the in-app reports and APIs allow you to specify a date range using from_date and to_date parameters. The to_date parameter is inclusive, so events on that day will be counted, but events after that day will not be included.For example, when using the Query API, you can specify: LBKSGET /segmentation?project_id=<id> &event=<event_name> &from_date=2024-06-01&to_date=2024-06-10LBKS
This will count only the specified event from June 1, 2024, up to and including June 10, 2024, and will not count any events after June 10, 2024Â Query API - Segmentation.Similarly, in JQL, you can set the from_date and to_date in the Events() function: LBKSfunction main() { return Events({ from_date: "2024-06-01", to_date: "2024-06-10", event_selectors: [{event: "Your Custom Event"}] }).reduce(mixpanel.reducer.count()); }LBKS
This will only count "Your Custom Event" up to and including June 10, 2024, and not after JQL: Create custom queries using Javascript code.If you are using the Mixpanel UI, you can use the date range selector to set the end date, ensuring only events up to that day are included in your report Reports Overview - Date Range.There is no need for a special filter; simply set the appropriate date range to achieve this behavior.
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! 📚
Based on the knowledge sources, Mixpanel custom events allow you to combine multiple events (and filters) into a single virtual event, which you can then use in reports and analyses. However, the documentation does not mention any built-in feature that allows you to define a custom event that counts one underlying event for a specific date range, and then automatically switches to counting a different event after that date range.Custom events are defined by selecting the events and properties you want to include, but the logic is static: it does not support conditional logic based on date ranges within the custom event definition itself. You can, however, create a custom event that includes multiple events, or filter events by properties, but not with dynamic date-based switching between events within a single custom event definition Custom Events: Combine multiple events for analyses.To achieve your goal, you would need to: - Create separate custom events for each period (e.g., one for the old event up to a certain date, and one for the new event after that date). - Use date filters in your reports to control which event is counted in which period.But you cannot create a single custom event that automatically switches the underlying event based on the date.I'm sorry, but the knowledge sources do not describe a way to have a custom event definition that changes its underlying event based on the date range. You will need to manage this logic in your reporting or data export process, not within the custom event itself.
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.