Create a calculated measurement on top of existing data that you can refer to across your workspace.
- On the Harmonize tab, expand Calculated Fields, and then expand Calculated Measurements.
- Click Add New.
-
In the General section, define the calculated measurement.
When setting the decimal places, the more places you specify, the more exact the calculation.
-
In the Advanced section define advanced settings.
- For Total Aggregation Function, select the function to calculate the total value of a query. For example, SUM, AVG, MIN, or MAX. Values that appear in separate rows of a display are all aggregated in the Total row. The Total Aggregation Function and the Aggregation Function—set in the expression section— should be the same.
- Set the granularity—Determine the level the calculations for the measurement takes place.
- To let null values be used in the formulas,, select Treat Nulls as Zeros
- To include the date in the granularity of the calculation, select Include Date in Granularity
-
In the Expression section, define the expression:
- Set the aggregation function to determine the calculation result for all the produced rows. When a granularity is set, the underlying calculation produces multiple calculation results for multiple rows. These rows must be aggregated into a single row of the displayed dimension.
-
Create the expression that you want to base the calculated measurement on using the list
of available measurements and functions. For example, if you want to calculate email open
rate that uses email sends as the denominator instead of email deliveries, use this
expression:
IFERROR([Email_Unique_Opens]/[Email_Sends], null)TheIFERRORfunction results in the calculated measurement returning null values when the email sends equal to 0. - To add a function to your expression, click it, or start typing for auto-complete.
- Click Save.