This is a correct syntax of the [LAG](https://community.denodo.com/docs/html/browse/6.0/vdp/vql/appendix/syntax_of_condition_functions/analytic_functions_window_functions) function in Denodo as well.
Since, this an analytic function analytic function, Virtual DataPort pushes down this function to the database, but does not execute it. If a query uses this function and it cannot be pushed down to a database, the query will fail.
To add it as a "new field" in a derived view :
Go to Edit section of the derived view -> output -> New field -> enter the field name and expression in the Field expression section -> Save
Hope It helps !