Skip to main content

Previous - script function

This script function returns the value of expression using data from the previous input record that was not discarded due to a where clause. In the first record of an internal table the function will return NULL.

Syntax:  

Previous(expression )

 

The previous function may be nested in order to access records further back. Data are fetched directly from the input source, making it possible to refer also to fields which have not been loaded into Qlik Sense, i.e. even if they have not been stored in its associative database.

Examples:  

LOAD *, Sales / Previous(Sales) as Increase from ...;

LOAD A, Previous(Previous( A )) as B from ...;

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!