Description 
Divides one or more timeseries by another timeseries 

Input 
Multiple timeseries 

Parameters 
None 

Output 
Grouped Time Series: Multiple 

Available in 
Alerts, Composites, Dashboards 
The ratioPairs function is one of the most commonly used in Anodot. It provides a simple way to divide one (or more) timeseries by another timeseries. This is often used to generate composites such as CPC (Cost Per Click) and CTR (ClickThrough rate).
Usage Example (CPC)
The ratioPairs function is created by entering two metric expressions; one as the Dividend, and another as the Divisor. The following example shows how to set up a CPC composite, based on the division of COST by CLICKS samples, that are grouped and matched by their AD_PLATFORM property:
The example above returns the metric result of dividing each COST data point by the matching CLICKS data point. The GroupBy function is mandatory here, as the two groups of metrics must be matched in at least one dimension: this allows the onetoone matching of COST and CLICKS metrics that share the same AD_PLATFORM property. The result of this composite will be one or more composite metrics, each one expressing the ratio between COST and CLICKS for a specific AD_PLATFORM value.
Important note: whenever available, make sure to explicitly include the relevant Stream source in the metric expressions, as seen in the example above. When using two different sources, the names and values of the relevant dimensions must be identical (casesensitive!).
For another detailed example, check the following tutorial.
Note: The Pairs function is similar to ratioPairs, but offers additional operations between matching timeseries samples (multiplication, addition, and subtraction).