Overview: Copper Query Builder
In this article, we will explain the options and functionality of Query Builder for Copper through an example. For this example, we'll build a Custom Metric using a Filter the number of Open Opportunities by Google Advertising Source, where the amount is greater than 50.
You can find Query Builder under Data manager ( link to Query Builder) or open it directly from our Designer tool.
IN THIS ARTICLE
1. Basic Options
We chose "Opportunities by Google Advertising" for our query name.
Count of Opportunitiesor
Value (Amount). A metric can be used in combination with other dimensions or metrics, but only where valid combinations apply for that metric.
dimensionparameter breaks down metrics by common criteria, such as by
Source(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 number of opportunities or total amount.
Read more about: Adding and Modifying Additional Date Ranges.
2. Advanced Options
ANDboolean logic. Filtered queries restrict the rows that do (or do not) get included in the result. Each row in the result is tested against the filter; if the filter matches, the row is retained, and if it doesn't match, the row is dropped.
- Contains: Aggregate metrics where the selected custom or default dimension contains selected value. In our case
- Does not contain: Aggregate metrics where the country does not contain selected value.
- Equals: Return results where the amount is exactly the selected value.
- Greater or equal than: Return results where the amount is greater or equal than selected value.
- Less or equal than: Return results where the amount is less or equal than the selected value.
- Greater than: Return results where the amount is strictly greater than the
- Less than: Return results where the amount is strictly less than the selected value.
In our example, we set a metric filter to see only number of opportunities where opportunitie amount is higher than 50.
When everything mentioned above is set, click "Run query" to show Data preview.
3. Data preview
In Data Preview you will see all values for selected metrics and date ranges. At the
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, the 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
Click on "..." next to "Value" and select "Round values." Enter the number of decimal places to be rounded to into field in