How to set different Aggregations for SQL, Google Sheets and Rest API Custom Metrics

Each SQL, Google Sheets, and Rest API Custom Metric supports only one data Aggregation function. To view the same SQL, Google Sheets, or Rest API Custom Metric with different Aggregation functions selected (i.e., "SUM" on one vs "AVG" on another), follow the steps in this document to duplicate Custom Metrics and create the views you desire. 

Pro Tip: Custom Metrics built using native integrations and Query Builders support multiple aggregations by default.   

HOW TO

How to set different data Aggregations for SQL Custom Metrics

1
 Navigate to  Metrics Query Builder
2
  Find the Metric you'd like to set another Aggregation for, using the  Search bar if necessary
3
 Click on the arrow next to the  Edit button to open the drop-down list. Select  Duplicate.
4
 In the  Data Aggregation Settings section, select the  Aggregation Function for the Custom Metric.  You can choose between Latest, SUM, MIN, MAX, AVG, and Count.

5
 Next, select the  Data Type.  You can choose between All Values and Period values. Learn more about Data Types here.

6
 In order to accurately explain what this Custom Metric is reporting on, set a name for your Custom Metric
7
 Click  Preview data to generate a Data Preview of the Custom Metric
8
 Once you confirm that these are the results you're looking for, click  Save to save the Custom Metric.
Pro Tip: If you need our assistance setting up SQL Custom Metrics, please contact our Support Team via in-app chat or email us at help@databox.com.

How to set different data Aggregations for Google Sheets Custom Metrics

1
 Navigate to  Metrics > Query Builder
2
  Find the Metric you'd like to set another Aggregation for, using the  Search bar if necessary
3
 Click on the arrow next to the  Edit button to open the drop-down list. Select  Duplicate.
4
 In the  Data Aggregation Settings section, select the  Aggregation Function for the Custom Metric.  You can choose between Latest, SUM, MIN, MAX, AVG, and Count.

5
 Next, select the  Data Type.  You can choose between All Values and Period values. Learn more about Data Types here.

6
 In order to accurately explain what this Custom Metric is reporting on, set a name for your Custom Metric
7
 Click  Preview data to generate a Data Preview of the Custom Metric
8
 Once you confirm that these are the results you're looking for, click  Save to save the Custom Metric.
Pro Tip: If you need our assistance setting up Google Sheets Custom Metrics, please contact our Support Team via in-app chat or email us at help@databox.com.

How to set different data Aggregations for REST API Custom Metrics

1
 Navigate to  Metrics > Metric Library
2
 Find the Metric you'd like to set another Aggregation for, using the  Search bar if necessary
3
 Click on the  ... hyperlink at the bottom of the Metric block
4
 Select Edit metric definition. This will open the  Metric definition window.  
5
 In the General tab, copy the  Internal Metric Key. Learn more about the Internal Metric Key here.

6
 Navigate back to Metric Library, and click + to create a new Custom Metric
7
  In the General tab, paste the  Internal Metric Key
8
 In order to accurately explain what this Custom Metric is reporting on, set a name for your Custom Metric in Display Name field
9
 Navigate to the  Data Aggregation tab. In the Data Type section select the  Aggregation function. You can choose between Latest, SUM, MIN, MAX, AVG, and Count.

10
 Next, select the  Data Type. You can choose between All Values and Period values. Learn more about Data Types  here.

11

 Click Save to save the Custom Metric

Pro Tip: If you need our assistance setting up your REST API Custom Metrics, please contact our Support Team via in-app chat or email us at help@databox.com.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us