Mixpanel Community Icon

Discrepancy Between Line and Pie Chart Data for Unique Visitors Explained

·
·

I have two charts showing the same data (unique website visitors over the last 7d). One chart is a simple line chart, the other is a pie chart with a breakdown by path. Why are the total numbers (total page unique website visitors) not the same on both charts despite having the same filters?

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

    Hi Thibaut N., 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

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

    This discrepancy in total numbers between your line chart and pie chart with breakdown is a common occurrence in Mixpanel, and there's a specific reason for it. The difference is due to how Mixpanel calculates unique users when applying breakdowns.According to the Mixpanel documentation:"When you apply a breakdown to a metric, by default, Mixpanel tells you how many unique users contributed to each segment. For example, in the image below, you can see there were a total of 2441 unique users, while the sum of individual segments is more than 3000. This is correct. That is because one user could have seen both a Home Page and a Shop Page, so they get counted as a user towards both segments."This means that in your pie chart with the breakdown by path, a single user who visited multiple paths within your 7-day period would be counted once for each unique path they visited. However, in your simple line chart, that same user would only be counted once overall.Mixpanel's default behavior is to answer the question: "per segment, tell me the number of unique users" rather than distributing the total unique users across segments. This can result in the sum of segmented unique users being higher than the total unique users.If you want to see how the total unique users are distributed across segments, you can use the advanced control for Uniques in Mixpanel. This allows you to choose which segment to associate a user with, either the first or last segment in the chart date range.Mixpanel Insights documentation provides more details on this behavior and how to adjust it if needed.

    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.