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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use previous

Hello,

I´m loading a text file with orders and some of the detail order lines contains a number but some of the other

does not. My aim is to add the number to all records within the order. An excerpt of the text file looks like this:

ST.png

with this line in my script can I only fill in 506 in the first record after 506 and the others will remain empty.

script.png

This is what I get:

utfallST.png

How do I get the lines with 'ST' empty filled with 506?

kindly

Håkan

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

If([@350:359] = Previous([@350:359]) and [@484:486] = '    ', Peek('ST'), [@484:486]) as [ST]

or

If([@350:359] = Previous([@350:359]) and Len(Trim([@484:486])) = 0, Peek('ST'), [@484:486]) as [ST]

View solution in original post

2 Replies
sunny_talwar
MVP
MVP

Try this:

If([@350:359] = Previous([@350:359]) and [@484:486] = '    ', Peek('ST'), [@484:486]) as [ST]

or

If([@350:359] = Previous([@350:359]) and Len(Trim([@484:486])) = 0, Peek('ST'), [@484:486]) as [ST]

Not applicable
Author

Thanks for VERY fast answer. I took 5 times longer time to create the question than get the answer.

Awsome.

kindly

Håkan