Qlik Community

Ask a Question

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Specialist
Specialist

Peek function in the script - how flexible is it?

Hi,

Can anybody tell me how flexible is the script function in the script?

It seems to behave differently compared to some QlikView rules for fields.

For example if I create a calculated field, I can refer that field back into the same calculated field.

E.g.

Load

Product,

Value

If(RecNo()=1, Amount,If(Product=Peek(Product), Value + Peek(AboveTotal),Value)) as AboveTotal

Resident Table

I never knew this was possible with peek.

3 Replies
MVP
MVP

Essentially, Peek() is addressing fields in the ouput table records (vs. input table records that can be adressed by Previous() ), hence all fields that are the result of your table load can be used.

Master II
Master II

MVP & Luminary
MVP & Luminary

A very good description could you find here: Peek() or Previous() ?

- Marcus