Skip to main content
Since 1.14.0 Calculate the time-weighted average over an interval, while interpolating the interval bounds. Similar to average, but allows an accurate calculation across interval bounds when data has been bucketed into separate time intervals, and there is no data point precisely at the interval bound. For example, this is useful in a window function. Values from the previous and next buckets are used to interpolate the values at the bounds, using the same interpolation method used within the TimeWeightSummary itself. Equal to interpolated_integral divided by the elapsed time.

Samples

Calculate the time-weighted daily average of the column val, interpolating over bucket bounds using the ‘last observation carried forward’ method:

Arguments

The syntax is:

Returns