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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan
MVP
MVP

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
MVP
MVP

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.