offset

Input Stack:
Duration
TimeSeriesExpr
Output Stack:
TimeSeriesExpr
 

Warning

Note that there is a deprecated List[Duration] variant that only modifes the presentation at the end. It cannot be used along with math operations.

Shift the time frame to use when fetching the data. This is used to look at a previous interval as a point of reference, e.g., day-over-day or week-over-week. Offset cannot be used with streaming execution of the query, consider using the delay operator for short intervals to detect a change.

Examples:

BeforeAfterCombined
name,sps,:eq,
(,name,),:by
name,sps,:eq,
(,name,),:by,
1w,:offset
name,sps,:eq,
(,name,),:by,
:dup,
1w,:offset
BeforeAfterCombined
name,sps,:eq,
(,name,),:by
name,sps,:eq,
(,name,),:by,
PT1H,:offset
name,sps,:eq,
(,name,),:by,
:dup,
PT1H,:offset