Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Missing Values

How to fill missing values with the latest populated value (case when the previous value is also missing)?

Eg IF I have table like this

A       B   C           D(to be filled)

a       t     1           1

b       u     2          2

c       v     3          3

d       w    -           3

e       x     -           3

f       y     -            3

g       z    4           4

The data in the column D is to be filled using the column C . How can I do this ?

5 Replies
tresesco
MVP
MVP

Try like:

Load

          A,B,C,

          If(Len(trim(C))=0, Peek(D), C) as D

From <>:

Gysbert_Wassenaar

LOAD

     A,

     B,

     C,

     If(Len(Trim(C)),C, peek(D)) as D

FROM

     ...source...

;


talk is cheap, supply exceeds demand
Not applicable
Author

Sure!  I shall try that.

Thanks for the response

Not applicable
Author

Thanks !

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post) and Helpful Answers (found under the Actions menu under every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!