How can I create a graph of cumulative values, for example I want to create chart analysing the screen size of my visitors, I want to create a chart, which starts from max value to min and each point in graph's vertical axis, dotting screen size should be having >x >x+1 > x+2... etc
Hi Anshul S., 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
To create a cumulative graph in Mixpanel that analyzes a numeric property like "screen size" and visualizes, for each screen size value, the count of users with screen size greater than or equal to that value (i.e., a reverse cumulative distribution), you can use the following approach:
1. Breakdown by Numeric Property: Start by breaking down your event (e.g., "Page View") by the "screen size" property. This will group your data by each unique screen size value.
2. Custom Bucketing (Optional): If "screen size" has many unique values, use the custom buckets feature to group screen sizes into ranges (e.g., 300–400px, 400–500px, etc.). You can choose "Even" or "Varied" bucketing, or display all values as-is if you want a detailed distribution. This helps in managing high-cardinality data and makes the chart more readable. See Numeric property Use Cases
3. Cumulative Analysis Setting: In the Insights report, after you have your breakdown, go to the "Analysis Settings" and select the Cumulative option. This will make each point on the graph represent the sum of all previous values, effectively showing a running total as you move from the largest to the smallest screen size. See Analysis Settings
4. Sort Order: To achieve the "max to min" effect, ensure your breakdown is sorted in descending order by screen size. This way, the cumulative line will start from the largest screen size and accumulate as you move to smaller sizes.
5. Visualization: Choose a line or column chart for clear visualization. You can further customize the axis, labels, and units using Mixpanel’s chart customization features. See Chart Customization
Note: Mixpanel’s cumulative setting adds up values as you move along the x-axis. By sorting your screen size buckets from largest to smallest, the cumulative line will show, for each screen size, the total number of users with that screen size or larger.
If you need a true "greater than or equal to" cumulative count for each screen size, ensure your buckets and sort order reflect this logic.
Summary of Steps: 1. Breakdown by "screen size" (with or without custom buckets). 2. Sort breakdown descending (max to min). 3. Enable "Cumulative" in Analysis Settings. 4. Choose your preferred chart type and customize as needed.
This approach leverages Mixpanel’s built-in features for cumulative analysis and custom bucketing, as described in the documentation. If you need more advanced logic (e.g., custom cumulative calculations not supported in the UI), you may need to use JQL, but the above method should suffice for most use cases in the Insights report.
Numeric property Use Cases Analysis Settings Chart Customization
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.
I am not looking for buckets, What I am looking for is that value on y-axis going from min to max, and each point is considering the values for this point and values from the prev point
Let me check the knowledge base for you again. One moment! 📚
Thank you for clarifying. Based on the Mixpanel documentation, the Cumulative analysis setting in Insights adds up the values of each point on the graph as it goes along, so the height of the line increases over time. This means that for each x-axis value (e.g., screen size), the y-axis will show the sum of that value and all previous values in the order they appear on the x-axis.
However, the documentation does not specify that you can reverse the order (from min to max or max to min) or that you can natively configure the cumulative calculation to always represent "greater than or equal to" for each point. The cumulative feature simply adds up the values as they are ordered on the x-axis, so if you sort your screen sizes from min to max, each point will represent the sum of that screen size and all smaller ones. If you sort from max to min, each point will represent the sum of that screen size and all larger ones.
To summarize: - Cumulative in Mixpanel will sum values as you move along the x-axis, in the order you have sorted your property (screen size). - You can control the direction (min to max or max to min) by sorting the breakdown accordingly. - Each point will include its own value and all previous values in the chosen order.
If you need a more advanced or custom cumulative calculation (such as a true "greater than or equal to" cumulative count for each screen size), the documentation does not provide details on achieving this beyond the standard cumulative setting in Insights. There is no mention of a built-in feature for this specific "reverse cumulative" logic beyond what is described above.
For more details, see the documentation on Analysis Settings.
If you need a more customized approach (e.g., using JQL), the knowledge sources do not provide an explicit example for this use case.
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.
