Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ?
Try like:
Load
A,B,C,
If(Len(trim(C))=0, Peek(D), C) as D
From <>:
LOAD
A,
B,
C,
If(Len(Trim(C)),C, peek(D)) as D
FROM
...source...
;
Sure! I shall try that.
Thanks for the response
Thanks !
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 .