series_less
This page explains how to use the series_less function in APL.
The series_less function compares two numeric arrays element by element and returns a Boolean array. Each position in the result contains true if the element in the first array is less than the corresponding element in the second array, and false otherwise.
You use series_less when you want to evaluate trends across sequences of numeric values. It’s especially useful in time series analysis, anomaly detection, or comparing metrics side by side. For example, you can check if response times are decreasing compared to a baseline or if one service consistently performs faster than another.
Usage
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
array1 | array | The first array of numeric values. |
array2 | array | The second array of numeric values. Must have the same length as array1. |
Returns
An array of Boolean values. Each element is true if the corresponding element in array1 is less than the element in array2, otherwise false.
Use case examples
You want to check whether the average request duration in each city is less than a fixed threshold of 150 milliseconds.
Query
Output
| geo.city | city_avg | threshold | is_less |
|---|---|---|---|
| London | [120, 90, 100] | [150, 150, 150] | [true, true, true] |
| Paris | [180, 200, 190] | [150, 150, 150] | [false, false, false] |
This query shows whether each city’s request duration stays below a 150 ms threshold at each time step.
You want to detect if failed requests in each country are consistently less than successful requests.
Query
Output
| geo.country | success_series | failure_series | failures_less |
|---|---|---|---|
| US | [300, 280, 310] | [10, 20, 15] | [true, true, true] |
| UK | [150, 140, 160] | [20, 25, 30] | [true, true, true] |
This query checks whether failures stay consistently lower than successful requests across time intervals.
List of related functions
- series_greater_equals: Compares two arrays and returns
truewhen elements in the first array are greater than or equal to the second array. - series_greater: Compares two arrays and returns
truewhere the first array element is greater than the second. - series_less_equals: Compares two arrays and returns
truewhere the first array element is less than or equal to the second. - series_not_equals: Compares two arrays and returns
truewhere elements aren’t equal.