Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
lukaspuschner
Partner - Creator
Partner - Creator

Previous-function

Hello everyone.

I have the following problem.

I have some fields with null()-values and i want to fill them with previous like this.

if(isnull(A), rangesum(previous(A), previous(B) * - 1), A) as C.

I have to use rangesum because in B can be null()-values too. But thats ok.

The Problem is, if A has two or more times in a row a null()-value, C gets this value too.

Help would be nice,

Lukas

10 Replies
sunny_talwar

Did not see the example output you gave. This will do the job for you:

LOAD RangeSum(if(isnull(A), Peek('A'), A), -Peek('B')) as A,

    B

FROM

Mappe2.xlsx

(ooxml, embedded labels, table is Tabelle1);


HTH


Best,

S