Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joshrussin
Creator III
Creator III

Using Peek

Question for using peek.

My data is already sorted by date, latest date is at the bottom.

I am trying to load an equation with peek().

(latest wip - (next to last wip - latest processed))

Here is what I have in my script and is coming up with different values.

(WIP - ((Peek(WIP,-1)) - Processed)) as WIP_Test

any tips or other methods?

Edit*

also tried Previous()

(WIP - ((Previous(WIP)) - Processed)) as WIP_Test

That doesn't work either.

18 Replies
vishsaggi
Champion III
Champion III

May be use Peek(WIP, -2)

MarcoARaymundo
Creator III
Creator III

Peek('WIP', -1)

vishsaggi
Champion III
Champion III

Sorry Missed the Quotes. Just keep quotes around the Fieldname.

joshrussin
Creator III
Creator III
Author

Still showing up different values.

vishsaggi
Champion III
Champion III

You said latest WIP right?

May be try below?

(Peek(WIP) - ((Peek(WIP,-2)) - Processed)) as WIP_Test

madhumitha
Creator
Creator

Hello Joshua,

If you are using this in your inline script, then below might help.

(Peek('WIP') - ((Previous(WIP,-1)) - Processed)) as WIP_Test

joshrussin
Creator III
Creator III
Author

Here is my file. I can't figure out why its not working correctly.

vishsaggi
Champion III
Champion III

Can you share your excel file just for reloading purpose. ?

joshrussin
Creator III
Creator III
Author

Here is excel file.