I have a certain property on user profiles. I want to find all distinct values that this property has across all profiles. How do I do this without JQL. (I currently have a JQL solution, but this is being discontinued and i need a replacement).
Hi Joonas L., 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
You can do this in the UI (no JQL) using an Insights report with an Aggregate Property measurement: 1. Go to Insights. 2. In the Measure dropdown, choose Event Property Values → Aggregate Property. 3. In the function list, select Distinct count. This “calculates the unique count of property values across all user profiles.” [Aggregate property] 4. Switch the data source from Events to Profiles (Users) so that the calculation runs on user profiles instead of events. The same Distinct count function applies to “all user profiles.” [Aggregate property] 5. Choose your profile property in the property picker.This will give you the set of distinct values that profile property takes across all profiles, and the count of profiles for each value, without using JQL.
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! 📚
There isn’t a single “give me all distinct profile property values” endpoint documented today, but there are two practical API-based workarounds in the docs: ---
1. Export profiles via Engage Query API, then dedupe client-side
Use the Engage Query API to export profiles (optionally only that one property), then collect/distinct the values in your own code.**Export profiles:**LBKScurl --request POST \ --url '[https://mixpanel.com/api/query/engage?project_id=1234567](https://mixpanel.com/api/query/engage?project_id=1234567)' \ --header 'accept: application/json' \ --header 'authorization: Basic YOUR_TOKEN' \ --header 'content-type: application/x-www-form-urlencoded'LBKSProfiles come back under results[*].$properties. You can restrict which properties are returned via output_properties (e.g. ["your_property_name"]). [[Exporting profiles](https://docs.mixpanel.com/docs/export-methods#exporting-profiles)]LBKSYou then: LBKS1. Page through all results using session_idandpage` as described in the Engage “Query Profiles” docs. [Query profiles]
2. In your app, collect that property from each profile and take the distinct set.This is the most direct JQL replacement.---
2. Use mixpanel-utils helper (Python) to query profiles and then dedupe
If you’re able to use Python, mixpanel-utils wraps the Engage API and already includes helpers that pull and process profile data. While it doesn’t have a “distinct property values” helper specifically, the patterns there (e.g. in deduplicate_people and people_union) show how to query profiles and operate over them. [Deduplicate people; Union a property]You would: 1. Use mixpanel-utils (or similar logic) to fetch all profiles that have this property.
2. Extract that property and build a set of unique values in your script.
3. Use that set to construct subsequent API queries.---Because the knowledge sources don’t document an API that directly returns the distinct set of profile property values (only distinct counts in Insights UI and for events via /events/properties), you must currently implement the distinct-value logic on top of a profile export. [Aggregate property; query-event-properties]
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.
