Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Rand and Peek

Hi All,

Please help to explain the two expressions.

Let vRnd = Floor(Rand() * $(vCustCount));   //( vCustCount=FieldValueCount('CustomerID');)

Let vCID = Peek('CustomerID', $(vRnd), 'Customer');

CustomerID:

1001

1002

1003

1004

1005

1006

1007

Thanks in advance.

1 Solution

Accepted Solutions
pokassov
Specialist
Specialist

Hi!

It's selection random CustomerID

First expression selects random row in customer

Second expression selects CustomerID for selected row above

View solution in original post

2 Replies
pokassov
Specialist
Specialist

Hi!

It's selection random CustomerID

First expression selects random row in customer

Second expression selects CustomerID for selected row above

jsanchezh
Partner - Creator
Partner - Creator

The first expression selects a row number from the CustomerID field and the second one selects a CustomerID based on the row number calculated before

Greetings