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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Peek or Previous for previous record -issue

I am getting 2 different source and get the price for missing period also based on previous record.

Please check the attached file

expecting results like

NewvalueSSUMatKeyFY_Period
924.54,40266F01,20072
924.54,40266F01,20073
924.54,40266F01,20076
924.54,40266F01,20077
924.54,40266F01,20078
924.54,40266F01,20079
924.54,40266F01,20081
924.54,40266F01,20082
924.54,40266F01,20087
924.54,40266F01,20092
6184.5,40266F01,20093
6184.5,40266F01,20094
6958.72,40266F01,20095
6958.72,40266F01,20096
6480.36,51364,20081
838.85,51364,20092

If it is one SSUMatKey

if

(IsNum(MovingPrice)=0,peek(Newvalue),MovingPrice) as Newvalue is working fine.

Advance thanks for your help.

1 Reply
Not applicable
Author

both works almost same but with peek() we can find the value of 1st row element which we'll get null with previous .

hope this helps.

thanks

Meher