Mixpanel Community Icon

How to Create a Pie Chart of Organizations by Country

·
·

Hi, how can I generate a pie chart of number of organizations per country? My events are per user, and each user has a country and orgzniuation property

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    To generate a pie chart of the number of organizations per country based on user events with country and organization properties, you can use Mixpanel's Insights report. Here's how you can do it:1. Go to the Insights report in Mixpanel.2. Select an event that represents user activity (since your events are per user).3. For the measurement, choose "Unique Users" instead of the default "Total Events". This will count unique users rather than all event occurrences.4. Add a breakdown by the "Country" property.5. Change the chart type to "Pie chart". You can do this by clicking on the chart type selector (usually shows "Line" by default) and choosing "Pie chart" from the options.6. To count organizations rather than users, you'll need to use the "Distinct count" aggregation on the organization property. Here's how: - Change the measurement from "Unique Users" to "Aggregate Property" - Select your organization property - Choose "Distinct count" as the aggregation method7. Your query should now show a pie chart representing the distinct count of organizations per country.This approach leverages Mixpanel's ability to perform property aggregations and visualize data in various chart types, including pie charts Insights: Visualize trends and compositions within your data.Remember that the exact property names ("Country" and your organization property) should match what you have in your Mixpanel project. If you need to group or modify these properties on the fly, you can use custom buckets or custom properties features 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.