Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
yelin_nyu
Creator
Creator

values equal to previous period

the inventory data is full of holes, in order to fill in those holes, i have to say if len(onhand)=0, onhand=onhand of previous day for this item at this store. how do i put that in the script?

Thanks

1 Solution

Accepted Solutions
MayilVahanan

HI

Try like this

Load *, if(Len(Onhand)=0, previous(Onhand), Onhand) as onHand

from datasource order by primaryfieldname, datefield asc;

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

HI

Try like this

Load *, if(Len(Onhand)=0, previous(Onhand), Onhand) as onHand

from datasource order by primaryfieldname, datefield asc;

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.