Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Performs a forward fill interpolation of missing values in a series.
An expression containing dynamic numerical array is the input. The function replaces all instances of missing_value_placeholder with the nearest value from its left side other than missing_value_placeholder, and returns the resulting array. The leftmost instances of missing_value_placeholder are preserved.
series_fill_forward(
series,
[ missing_value_placeholder ])
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
series | dynamic |
✔️ | An array of numeric values. |
missing_value_placeholder | scalar | Specifies a placeholder for missing values. The default value is double( null) . The value can be of any type that can convert to actual element types. double (null), long (null), and int (null) have the same meaning. |
series with all instances of missing_value_placeholder filled forwards.
Note
- If you create series using the make-series operator, specify null as the default value to use interpolation functions like
series_fill_forward()
afterwards. See explanation. - If missing_value_placeholder is
double
(null), or omitted, then a result can contain null values. To fill these null values, use other interpolation functions. Only series_outliers() supports null values in input arrays. series_fill_forward()
preserves the original type of the array elements.
The following example performs a forward fill on missing data in the datatable, data.
let data = datatable(arr: dynamic)
[
dynamic([null, null, 36, 41, null, null, 16, 61, 33, null, null])
];
data
| project
arr,
fill_forward = series_fill_forward(arr)
Output
arr |
fill_forward |
---|---|
[null,null,36,41,null,null,16,61,33,null,null] | [null,null,36,41,41,41,16,61,33,33,33] |
Use series_fill_backward or series-fill-const to complete interpolation of the array.