series_multiply function performs element-wise multiplication between two numeric dynamic arrays (series). Each element in the first series is multiplied by the corresponding element at the same position in the second series.
You can use series_multiply when you need to scale time-series data, apply weights, or combine multiple metrics through multiplication. This is particularly useful for calculating weighted scores, applying normalization factors, or computing products of related measurements.
For users of other query languages
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.Splunk SPL users
Splunk SPL users
In Splunk SPL, you typically use the 
eval command with the multiplication operator to calculate products between fields. In APL, series_multiply operates on entire arrays at once, performing element-wise multiplication efficiently.ANSI SQL users
ANSI SQL users
In SQL, you multiply values using the 
* operator on individual columns. In APL, series_multiply performs element-wise multiplication across entire arrays stored in single columns.Usage
Syntax
Parameters
| Parameter | Type | Description | 
|---|---|---|
| series1 | dynamic | A dynamic array of numeric values. | 
| series2 | dynamic | A dynamic array of numeric values. | 
Returns
A dynamic array where each element is the result of multiplying the corresponding elements ofseries1 and series2. If the arrays have different lengths, the shorter array is extended with null values.
Use case examples
- Log analysis
- OpenTelemetry traces
- Security logs
In log analysis, you can use Run in PlaygroundOutput
This query applies priority weights to request durations, emphasizing certain time periods or request types in performance analysis.
series_multiply to apply weighting factors to request durations, calculating weighted performance metrics.Query| geo.city | durations | weights | weighted_durations | 
|---|---|---|---|
| Seattle | [50, 60, 55, 58, 52] | [1.0, 1.2, 0.8, 1.1, 0.9] | [50, 72, 44, 63.8, 46.8] | 
| Portland | [45, 50, 48, 52, 47] | [1.0, 1.2, 0.8, 1.1, 0.9] | [45, 60, 38.4, 57.2, 42.3] | 
List of related functions
- series_subtract: Performs element-wise subtraction of two series. Use when you need to subtract values instead of multiplying them.
- series_pow: Raises series elements to a power. Use when you need exponentiation instead of multiplication.
- series_sum: Returns the sum of all values in a series. Use to aggregate the results after multiplication.
- series_abs: Returns absolute values of elements. Use when you need magnitude without direction.