why would mixpanel threw this error when looking at distinct counts of an aggregate property?
Cardinality limit exceeded. Consider reducing the date range, removing breakdowns, or filtering out data.
Hi Jorge C., 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
Mixpanel throws the "Cardinality limit exceeded" error when the number of unique segments (distinct values) in your breakdown or aggregation exceeds the platform's segment limits for interactive reports. This often happens when you are looking at distinct counts of an aggregate property with very high cardinality (i.e., the property has a large number of unique values).Mixpanel enforces these limits to keep reports fast and responsive. For example, in Insights reports, the visible limit is 3,000 segments, and the CSV export limit is 10,000 (or 50,000 for some chart types). If your query tries to return more segments than these limits, you'll see this error. The error message suggests reducing the date range, removing breakdowns, or filtering out data to bring the number of segments under the limit. You will also see a banner in the UI indicating that results were truncated due to these limits Segment Limits and Ordering.High-cardinality properties (such as user-generated content, unique IDs, or timestamps) are common causes of this error. Mixpanel recommends avoiding breakdowns on such properties for this reason. If you need to analyze high-cardinality data, consider exporting the data as CSV, where higher limits apply, or filtering your data to reduce the number of unique segments returned.For more details, see the documentation on segment limits and ordering here.
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.