Previous() finds the value of the expr expression using data from the previous input record that has not been discarded because of a where clause. In the first record of an internal table, the function will return NULL.
Return data type: dual
|expr||The expression or field containing the data to be measured.
The expression can contain nested previous() functions in order to access records further back. Data are fetched directly from the input source, making it possible to refer also to fields that have not been loaded into Qlik Sense, that is,even if they have not been stored in its associative database.
In the first record of an internal table, the function returns NULL.
Input the following into your load script
Load *, (Sales - Previous(Sales) )as Increase Inline [
] (delimiter is '|');
By using the Previous() function in the Load statement, we can compare the current value of Sales with the preceding value, and use it in a third field, Increase.