last()

Table of Contents

Definition

last() returns the last seen value of the table column. You can use it with transform commands that support aggregations.

The last seen value of the column is the oldest event of this column. Events are not necessarily presented in a chronological order in the result.

Examples

You can use last() with timechart or other charting commands. The following query searches for last seen values in balance column and groups result by operation column.

%dpl
index=crud earliest=-3y
| spath
| timechart last(balance) by operation
example of last() function

Further Reading