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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Replacing missing values with previous row's value

Hi there,

I have an excel table such as the following:

ProductPrice
Product A10
-10
Product B20
-20

Notice that some of the values for 'Product' is missing. What I would like to do in my load statement, is to populate these missing values with the value of the above row (i.e in this case replace first '-' with Product 'A', and second '-' with 'Product B')

Is there a way in the Load statement to check if Product is null/missing, then populate with the value above?

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Like this:

LOAD

     If(IsNull(Product), Peek('Product'), Product) As Product,

     Price

FROM ...

Or use the advanced filtering from the load wizard and use the Fill option.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Like this:

LOAD

     If(IsNull(Product), Peek('Product'), Product) As Product,

     Price

FROM ...

Or use the advanced filtering from the load wizard and use the Fill option.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Hi

Looks like youare in need of the Peek() function.

This blog post gives lots of details:

          Generating Missing Data In QlikView



Best Regards,     Bill

Not applicable
Author

Thanks!

Not applicable
Author

Thanks!