Skip to main content

Query Builder reference


The Query Builder is the set of controls on the left side of the Explorer page.


Field Description
Dataset Select the dataset with the data that you want to analyze. Click the Settings icon in the left navigation pane to view detailed information about the datasets.   
View Switch between views to visualize the results of your queries in different ways. See Views and chart controls for information about the different views that you can select.
Global Filters Global Filters are filters that your admin can pre-build for you to use with your queries. See Create and use Global Filters for more information.


Field Description
Start / End Define the time range for a query. You can use the date selector or type directly into the fields. See Time query syntax for more information about setting the time ranges.
Compare Times

Compare the time range you selected to a prior time period. For example, you can use this to look at a measure week over week to see how it changed.

The previous time period is shown as a dotted line in Time view.


Field Description
Measure Select what you want to measure. This can be a count or an aggregation over a field, such as an average or median, or metrics that you have created.  
Column If you are using a column as a measurement, select the column to use. This can be a column in your dataset, a derived column, or metrics that you have created, or metrics that are generated automatically when you create sessions and funnels. 
Add Measure You can add multiple measures to do side-by-side comparisons. 

The default measures include:

Measure Description
Count Events Gives a simple count of events matching the query
Count Unique Gives a count of unique events within a column matching the query.
Sum Gives the sum of the numeric values of all results returned for a query. Valid only for numeric data.
Average Shows the average (mean) value of a given parameter over time.
Median Shows the median value (50th percentile) of a given parameter over time.
Minimum Shows the lowest value that matched the query at any time during the specified time period.
Maximum Shows the highest value that matched the query at any time during the specified time period.
Percentile Shows the value at the selected percentile for a given parameter over time.
Ratios Ratios divide the result of one measurement by the result of another. You can use pre-seeded ratios or create your own.
Custom Opens a New Ratio Metric window where you can define a ratio measure.
Add Measure Use this to build a query that measures multiple parameters.


For some views, you can visually compare two or more attributes by grouping results in multiple dimensions. 

Field Description

Segment your query by one or more fields, metrics, or sessions to group your results in multiple dimensions. 

You can use Compare with the Time, Table, Bar, Pie, Stacked Area Time, Stacked Bar 

Stack by For the Stacked Bar view, you can vertically split ("stack") the bars by a field, metric, or session. 


Use filters to control which data is included in the query and visualization. Click Simple to select a column from your data, or a custom metric, funnel, or session. Click Advanced to enter a text query. Click Compare to compare two or more attributes by grouping results in multiple dimensions.

Filter option Description
Simple Select one or more columns or metrics to use as a filter for your query. If you add multiple filters, they are joined in an AND operation.
Advanced Choose this option to enter a text filter, such as ((x="a") or (y="b")) and (z>1000). You can join multiple filters with AND or OR operations. See Advanced filter syntax for more information.

Choose this option to compare the results of two or more filtered queries.

When you use the Compare filter, the results of the filtered query A will be compared with the results of query B. Those queries can be further specified by choosing Add Filter.

Add Filter Add more filters to your query.
Add Compare Group Use this to compare more than two filtered queries.
  • Was this article helpful?