How can I filter number of unique users by percentage per bucket?
Hi Ani A., 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
Based on the knowledge sources, there are several ways to filter or bucket users by percentage in Mixpanel:
Custom Retention Brackets
If you're looking at retention analysis, you can use custom bracket retention to split users into customized intervals: 1. Go to the Retention query builder 2. Select "Custom" from the time unit drop-down 3. Define the size of each bracket for your given time unitThis allows you to create meaningful touchpoints and understand what percentage of users are retained in specific time intervals rather than exact days.Mixpanel Docs: Custom Retention Brackets
Numeric Bucketing
For more general numeric bucketing of users: 1. In JQL (JavaScript Query Language), you can use mixpanel.numeric_bucket()
to segment users into buckets based on numeric values: LBKSfunction main () { return People().groupBy( [mixpanel.numeric_bucket('properties.age', [0, 5, 18, 30, 60])], mixpanel.reducer.count()); }LBKS
This example buckets users into five age groups and counts how many users fall into each bucket.Mixpanel Docs: JQL Numeric Bucket
Distribution Measurement
If you want to see the distribution of users by a specific metric: 1. In Insights, select "Frequency per User" or "Aggregate Property per User" as your measurement 2. Then choose "Distribution" as your aggregation optionThis will show you how your users are distributed across different buckets based on the frequency of events or property values.Mixpanel Docs: Aggregate Property per User
Segmentation API
For programmatic access, you can use the Segmentation Numeric Query API to get data for an event, segmented and filtered by properties, with values placed into numeric buckets: LBKSGET /segmentation/numericLBKS
This allows you to bucket numeric values and analyze user behavior across these buckets.Mixpanel Query API: Segmentation Numeric QueryThese methods should help you filter and analyze your users by percentage across different numeric buckets 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.
Let me check the knowledge base for you again. One moment! 📚
To display percentages instead of raw numbers for your bucketed data in Mixpanel, you have a few options:
Using Value Comparisons in Insights
When you have your data broken down by buckets, you can use the Value Comparisons feature to show percentages: 1. Create your report with the desired buckets 2. Click on Compare → Overall 3. This will show each segment as a percentage of the wholeMixpanel Docs: Value Comparisons
Using Custom Buckets with Formulas
1. Set up your Custom Buckets for your data 2. Create a Formula to calculate percentages: - Add your metrics to the report - Click the Metrics button, then select "Formula" - Use division to calculate percentages (e.g., A/B*100 to show A as a percentage of B)Mixpanel Docs: Custom Bucketing Mixpanel Docs: Formulas
For Unique Users Analysis
When analyzing unique users with breakdowns: - By default, Mixpanel shows how many unique users contributed to each segment - You can use the advanced controls for Uniques to determine how users are distributed across segments - Choose whether to associate users with their first or last action in the time periodMixpanel Docs: How Breakdowns Work with Uniques
Using JQL for Custom Analysis
For more advanced percentage calculations, you can use JQL to: 1. Group users into buckets 2. Calculate the total count 3. Compute the percentage for each bucket```function main() { // Group users into buckets and count var bucketedUsers = People().groupBy( [mixpanel.numeric_bucket('properties.age', [0, 5, 18, 30, 60])], mixpanel.reducer.count() );
// Additional calculations would be needed to convert to percentages return bucketedUsers; }```Mixpanel Docs: JQL Numeric BucketRemember that Custom Buckets is available in Insights, Funnels, and Retention reports, and works with String, Numeric, and List data types.
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.