I have an event "page_viewed" with attributes "cost" and "sector". I have a table with a metric that is the median of the "cost" for the event "page_viewed" and I have a breakdown per sector, so I have the median cost per sector. Now, I'd like to add another metric that gets the number of unique users for the event "page_viewed" with a "cost" greater than the median (so the metric A). Is that possible?
Hi Marc B., 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 create the metric you're describing in Mixpanel Insights. Here's how you can approach this:1. First, create your initial metric for the median cost: - Event: "page_viewed" - Measurement: Aggregate Property > Median > "cost" - Breakdown: "sector"2. Then, add a new metric: - Event: "page_viewed" - Measurement: Unique Users3. For the second metric, you can use Mixpanel's custom filtering to set a condition where "cost" is greater than the median from the first metric.However, there's a catch: Mixpanel doesn't allow direct referencing of one metric's result in another metric's filter within the same report. To work around this, you have a couple of options:1. Use Custom Buckets: You can create custom buckets for the "cost" property, with one bucket being "Greater than median". Then use this custom bucket in your second metric's filter. Custom Buckets allow you to group your high-cardinality segments into buckets, which can be useful for this kind of analysis.2. Use a Formula: You might be able to create a formula that calculates this metric. Formulas in Mixpanel allow you to make calculations using simple arithmetic operators. Formulas3. Create a Custom Event: You could create a custom event that only fires when the "cost" is above a certain threshold. This threshold could be updated periodically to match the median. Custom EventsThe exact implementation will depend on the specifics of your data and how frequently the median changes. If you need more precise control, you might need to pre-process your data or use Mixpanel's API to create more complex custom metrics.Remember that Mixpanel's Insights is designed for flexibility, so there may be multiple ways to achieve your goal. You might need to experiment with different approaches to find the one that best fits your needs.Insights Overview Measurements in Mixpanel
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.