Overview: Mixpanel Query Builder
In this article, we will explain elements and functionality of the Query Builder for Mixpanel through an example. Our example will be based on "Segmentation", however you can also choose "Explore, Funnels, Retention and Multisegmentation".
IN THIS ARTICLE
Our goal is to figure out how many new queries (in the Databox web application) were created - only for users on a basic plan and from the United States.
dimensionsparameter breaks down metrics by common criteria, such as by
country(like in our example). When dimensions are requested, values are segmented by dimension value. If a query has no
dimensionsparameter, the returned metrics will provide aggregate values for the requested date range, such as overall pageviews or total bounces.
Compare With (optional): Select a date range to compare your previously selected interval to. This date range will be used for "previous line" on line and bar charts, and for calculating change %. Options are:
Previous period .
2. Advanced options
Here you can choose, how the results should be displayed:
- Push timestamp instead of value - If checked, values will be replaced with timestamps.
- Don't skip 0 values for dimensions - By default 0 values are skipped, since they do not contain any data. You can check this if you would like to display 0 values in the results.
3. Data preview
In Data Preview you will see all values for the selected metric and date ranges. At the bottom you can check total values. Just click on tabs for switching between date ranges, if you have selected more than one.
If you want to sort values by date/time just click on the arrow next to "Date"
When your query is ready, click "Save query." Now a new metric has been created, with the metric name the same as the custom query name.
By default, a metric will be added in the datasource where data is pulled. It is possible to change the target datasource by clicking on "Change target data source" on the top right.
It is possible to rename dimensions (best practice is to rename them before saving the query) by clicking "..." next to "Dimension" and then selecting "Rename dimension".
This function is useful when you want to exclude one or more dimensions (for example if you want to show data for all Countries except one). Click on "..." next to "Dimension" and select "Skip dimension".
Click on "..." next to "Value" and select "Round values." Enter the number of decimal places to be rounded to into field in popup, and values will be rounded accordingly.