Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

joshrussin
Not applicable

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
Not applicable

Re: Using Peek

May be use Peek(WIP, -2)

MarcoARaymundo
Not applicable

Re: Using Peek

Peek('WIP', -1)

vishsaggi
Not applicable

Re: Using Peek

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

joshrussin
Not applicable

Re: Using Peek

Still showing up different values.

vishsaggi
Not applicable

Re: Using Peek

You said latest WIP right?

May be try below?

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

madhumitha
Not applicable

Re: Using Peek

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
Not applicable

Re: Using Peek

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

vishsaggi
Not applicable

Re: Using Peek

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

joshrussin
Not applicable

Re: Using Peek

Here is excel file.