Before you begin: This guide shows you how to create calculations in TapClicks. Calculations enable you to create new metrics to use in reporting based on existing connector data. For example, if you want to average two numbers together, you can use calculations to calculate that average and then use it in your reports.
Calculations also work with Channels. You can combine multiple services and then create a calculation spanning across all services. For example, suppose you want to create a Channel that combines calltracking services. You can do this by creating a new metric called Channel Metrics that is produced by dividing Total Cost by Total Calls.
How to Create a New Calculation
1] On the left side menu, under Data, click Calculations.
2] The Calculations page appears.
3] In the upper right, click the Add New Calculation button.
4] The New Calculation page appears.
Define the Calculation and Data Source
NOTE: To define the calculation, first you'll have to give it a name, then you'll have to specify the data type, data source, and data view. 
5] Enter a name for the calculation in the Name textbox.
6] From the Data Type dropdown menu, choose a data type. The data type is the intended output your calculation is meant to produce.
7] From the Data Category dropdown, choose a data source (i.e., connector or channel) from which to provide inputs to your calculation.
NOTE: You will only see metrics that are currently active in your data source. So, if something isn't available in the dropdown to choose from, doublecheck your data source! 
8] From the Data View dropdown, choose which data view you want to use in your calculation. If you aren't sure which data view has the metrics you want to use, search for your data source at https://www.tapclicks.com/connectors to see the data view and metric details to determine the right data view for your calculation.
NOTE: The options available on the Data View dropdown depend on the Data Category you previously chose. 
Build a Calculation
This section describes the different ways to build calculations, the components of a calculation, and typing guidelines for creating a calculation.
NOTE: You build the calculation in the Calculation Builder. There are two ways to build a calculation:

NOTE: Calculations are comprised of four components:

NOTE: Use the following guidelines when typing directing in the Calculation Builder:

Build a Basic Calculation Example
In this example, we'll build a basic calculation to calculate the clickthrough rate (CTR) which uses the following formula: clicks / impressions * 100.
9] Start by turning off the Advanced Calculation toggle.
10] Now we will use the basic calculation builder to build the CTR calculation, start by clicking the Clicks metric.
11] The Clicks metric appears in the Calculations Builder.
12] Click the division operator.
13] Click the Impressions metric.
14] Click the multiplication operator.
15] Enter the number 100. The Calculation Builder should look like this:
16] Click the Verify button below the Calculations Builder.
17] If there are no errors, a notification indicating such will briefly appear in green below the Verify button.
18] Click Save. If the calculation was successfully saved, a notification indicating such will briefly appear beneath the Save button.
19] When you return to the Calculations pages, you'll see the calculation you just created.
Build an Advanced Calculation Example
In this example, we'll use the advanced calculation builder to create a conditional statement that calculates the average clicks for a specific ad campaign.
20] First, ensure that the Advanced Calculation toggle is turned on.
21] Now, we will use the advanced calculation builder to build our average clicks calculation. Start by clicking the IF function.
22] The builder will populate with the IF conditional statement.
23] Build your IF statement by clicking on the metric button, and then selecting Campaign Name under Fields.
24] Next click the operand button and select = from the Operators or type on your keyboard by doubleclicking the button.
25] To finish the conditions, double click the condition button and type the name of the Campaign you want to calculate the average for.
26] Now, we need to conclude the conditional statement with results. Click the result 1 box and under functions select AVG(value).
27] Click the value button inside the average function and under fields, select Clicks.
28] Finally, double click the result 2 button and enter 0. When you are finished, the calculation builder should look like this:
29] Click the Verify button below the Calculations Builder.
30] If there are no errors, a notification indicating such will briefly appear in green below the Verify button.
31] Click Save. If the calculation was successfully saved, a notification indicating such will briefly appear beneath the Save button.
32] When you return to the Calculations pages, you'll see the calculation you just created.
What's next?
To see a complete list of calculation functions, see the Calculations Function Reference.
For more information about calculations, see FAQs: Calculations.
To learn about how Audit Logs can help you track changes to your calculations, see Understanding Audit Logs.