Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help with script

i have 7 fields

Date

plant no

material no.

closing stock,

opening stock,

open stock,

last stock,

Now in closing stock and last stock there are many null values what i want to do is if plant no and material no. is same of previous date and closing stock is null then copy above date closing stock in current closing stock.

I am attaching excel sheet and 1 qvw ... please help

3 Replies
francoiscave
Partner - Creator III
Partner - Creator III

Hi Navneet,

See like below and attached files:

It's good ?

Have fun with QV,

François

Anonymous
Not applicable
Author

Hi,

Try:

load *,

if([Plant Code]= Previous([Plant Code]) and [Material Number]= Previous([Material Number]) and len(Trim([Closing Stock])) = 0,Previous([Closing Stock]),[Closing Stock]) as ClosingStock;
LOAD [Plant Code],
[Material Number],
Date,
[Closing Stock],
[Last Stock],
DPM,
[Open stock],
[Opening stock]
FROM

(
biff, embedded labels, table is Sheet1$);

Regards

Neetha

francoiscave
Partner - Creator III
Partner - Creator III

Hi Navneet,

Have you find a solution ?

If your are satisfied by a response, please mark it as correct or helpful to close this tread.

If not, how can we help you?

Thanks,

François