Purpose
This template is designed to aggregate field level data and perform calculations on the aggregated data. The template can be used for assessment purposes on custom and standard fields or for summarizing data in the job.
Category Location: All, Calculate or manipulate,
Field Description
Step 1: Create a manual data source to store metrics
- Checkbox - Fill the checkbox to create a new manual data source to store metrics
- Data Source - select an existing manual data source to store metrics, or supply a new manual data source name. The new manual data source is default configured to always add
- Description - write a short description about this metric. Descriptions are stored in op_metric_decription inside the manual data source
Note:
- You will need to create metrics attributes, which are different from other job attributes. Metrics attributes are written to the manual data source, regular job attributes will not be written to the manual data source.
- There is only 1 record written to the manual data source per run
Step 2: Perform aggregation activities on records
- Add Metric Attribute - Create a new attribute to store aggregated outputs
- Write metric to - select a new attribute, or existing attribute to store aggregated outputs into
- Aggregation operator - select an operator from the picklist (sum, average, min, max, count, standard deviation, variance, range)
- Input attribute to aggregate - select a field from the input data source you want to aggregate
- Aggregation filter - filter the input data to filter for what you are aggregating
Select the plus icon on the left to create another aggregation action.
Step 3: Calculate equations
- Add metric attribute - Create a new attribute to store calculation outputs
- Write calculations to - select the new attribute you just created, which will contain calculation outputs
- Calculation - Type calculations in this section (e.g. 0P Total Emails - 0P Missing Emails)
Note: Calculation attributes can be used in subsequent calculations. Calculations are evaluated using standard math rules (PEMDAS).
Available operators:
- Addition: '2 + 2'
- Subtraction: '2 - 2'
- Multiplication: '2 * 2'
- Division: '2 / 2'
- Exponential: '2 ^ 2'
- Unary Minus,Plus (Sign Operators): '+2 - (-2)'
- Modulo: '2 % 2'
Available functions:
- abs: absolute value
- acos: arc cosine
- asin: arc sine
- atan: arc tangent
- cbrt: cubic root
- ceil: nearest upper integer
- cos: cosine
- cosh: hyperbolic cosine
- exp: euler's number raised to the power (e^x)
- floor: nearest lower integer
- log: logarithmus naturalis (base e)
- sin: sine
- sinh: hyperbolic sine
- sqrt: square root
- tan: tangent
- tanh: hyperbolic tangent
Reviewing Outputs
In this example we calculated the total number of converted contacts containing emails. Here is how the task was configured:
Outputs can be filtered to display calculations per run cycle, or for every run cycle. Each run cycle output will be displayed in rows. Use the system field ‘Custom Metric Record Processed Time’ to see the run time/date for each run cycle.
There are three rows in our Table Columns section because the job was run three times. Rows 2-3 are different from Row 1 because the task was modified. The field ‘Total Converted Contacts w/ Emails’ shows a different value in Row 1 than in Row 2-3 because of how the task was modified.