Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Peek function

Hi all,

How to use peek in stright table expression with if condition

7 Replies
swuehl
MVP
MVP

Peek() is a inter record function for use in the script only.

You can look into chart inter record functions like Above() / Below():

=Above(Sum(Value))

Anonymous
Not applicable
Author

Hi,

Like swuehl already mentioned, you can use Peek() only in the script.

Refer to this help page for inter-record functions, where you can read which functions work only oin charts, script ofr both.

Inter-record functions ‒ QlikView

sunny_talwar

What is your exact requirement? May be if you provide a sample to look at with your expected output, we may be able to offer you better help.

Just to add to the responses of above two, there is also Before/After which are used for pivoted dimensions in a pivot table. But once again it would be better if you can share a sample

Not applicable
Author

Hi sunny,

I need to implement below one.

Rate XP

1.      1- Rate

3.       1-(prev XP)*(1-Rate),

:

:

; and so on

sunny_talwar

This is still an incomplete sample. Would it be possibe to provide few rows of data (may be in an excel file) with the expected output?

swuehl
MVP
MVP

Maybe something like this:

Use Rate field as dimension (or better a primary key of your input table?), then create an expression labelled "XP"

=If(rowno() =1, 1- Rate, 1- Above("XP")*(1-Rate) )

Not applicable
Author

Hi sunny,

I have fields like below

Id  rate 

1     3

2     4

3     5

4     2

::

:

:

And so on

I need to calculate XP field using below logic

For first record XP is Rate value

For 2nd record XP is 1-(1- previous XP)*(1- current record Rate value)

And so on

Id Rate XP

1   3     3

Plz help me