Calculated Data Series allows you to chart custom calculations while still leveraging all of the benefits of Data Explorer: dynamic groupings and date ranges, chart transforms, and dashboard filtering.
When adding a Calculated Data Series, you can enter complex formulas referencing the columns in your transactional table of data. These calculations are dynamic, when the date grouping or date range of your metric changes, the expression is re-run and the chart displays the correct results.
Expressions in Calculated Data Series follow a Google Sheet like syntax for aggregations and mathematical operators. For example, if you wanted to calculate Average Deal Size, you would enter this expression:
You can also leverage conditional aggregations like SUMIFS and COUNTIFS, so that you can create advanced calculations without SQL knowledge.
Adding a Calculated Data Series
Calculated Data Series are only supported in the Data Explorer Metric Builder.
To add a Calculated Data Series, select +Add data series on the Chart Tab of the Metric Builder. Instead of selecting a column from your table of data, select "Calculate a Data Series" at the bottom of the dropdown. This will open the "Calculate a Data Series" modal where you enter the calculation you would like to add to the chart.
Enter Your Calculation
In the Calculated Data Series modal, start typing in the box to enter your expression. Grow provides a helpful autofill to help guide you in entering a valid expression. You can start typing aggregations or column names and the autofill will suggest the correct syntax.
Please note that any column you want to reference from your transactional table of data must be wrapped by an aggregation (with the exception of criteria columns in conditional aggregations). Columns must be wrapped by an aggregation because of the dynamic groupings in Data Explorer, you must tell Grow what aggregation you want to use when grouping your transactional data.
You must enter a Column Title in order to save a Calculated Data Series. Column Titles must be unique from both the column names in the table of data and the names of other Calculated Data Series.
Supported Syntax and Examples
Calculated Data Series uses Google Sheets like syntax for all Basic Aggregations and Conditional Aggregations. However, please note that the syntax for column names and syntax highlighting for different arguments is the same as Calculated Columns on the Data Tab. Calculated Data Series also supports the same operators as the Filter Transform.
The following operators and aggregations are currently supported in Calculated Data Series:
|sum of range|
|count of range (includes blanks)|
|average of range|
|maximum of range|
|minimum of range|
|unique count of range (does not count blanks)|
When using multiple mathematical operators in the same expression, please note the calculation will respect order of operations.
This expression finds the largest sale value over the selected grouping
This expression runs the sum of sales divided by the total number of orders over the selected grouping, calculating average order value.
|returns the sum of a column depending on the criteria specified|
|returns the count of values in a column depending on the criteria specified|
|returns the average of a column depending on the criteria specified|
|returns the max value of a column depending on the criteria specified|
|returns the min value of a column depending on the criteria specified|
|returns the unique count of values in a column depending on the criteria specified|
[column_name]the column to perform the aggregation on (ex: the column to be summed or counted)
[criteria_column]the column (or range) to check the specified criteria against
"criteria"the specified criteria to run against the criteria column
[criteria_column2],"criteria2",...additional columns (or ranges) and criteria to check
|does not equal|
|greater than or equal to|
|less than or equal to|
|checks for cells that contain defined string criteria|
|checks for cells that do not contain defined string criteria|
|checks for cells that equal defined criteria|
|checks for cells that do not equal defined criteria|
|checks for empty cells|
|checks for non-empty cells|
- Criteria specified in
ISNOTONEOF()is not case sensitive
You can apply the
DOESNOTCONTAIN()operator on any data type (text, numeric, or date column).
SUMIFS([sales], [sales_rep], "Austin")
This expression sums Austin's sales over the selected grouping.
SUMIFS([order_id], [lead_source], ISONEOF("Social", "Paid"))
This expression sums the number of orders where the lead source equals "Social" or "Paid."
COUNTIFS([order_id], [sale_amount], ">100", [type], CONTAINS("New"))
This expression counts the number of orders where the sale amount is greater than 100 and the customer type contains the string "New"
COUNTIFS([order_id], [sales_amount], ">100", [customer_type], ISNOTBLANK)
This expression counts the number of orders where the sale amount is greater than 100 and customer type is not blank
COUNTIFS([Deal Amount], ">100")
This expressions counts the number of deals where the deal amount is greater than 100
You will notice this expression does not explicitly define the criteria_column. If you are entering a single criteria conditional aggregation, and the column you are aggregating is the same column you wish to run your criteria against, you do not need to specify the criteria_column.
Edit a Calculated Data Series Expression
To edit a Calculated Data Series expression, simply click the pencil of the Data Series you would like to edit. Upon clicking the pencil, you will be presented with the Calculated Data Series model where you can edit your expression or Column Title. You must click "Save" or "Cancel" to exit the model. Clicking "Cancel" will not save any changes made to the expression or the title.
Calculated Data Series and Data Explorer Compatibility
Here is the list of Chart Types and Chart Transforms that you can use while leveraging Calculated Data Series:
All Series Charts
Pie, Donut, & Funnel Charts
Sort & Limit