Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Arjunarao
Honored Contributor 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
Valued Contributor

Re: Rand and Peek

Hi!

It's selection random CustomerID

First expression selects random row in customer

Second expression selects CustomerID for selected row above

2 Replies
pokassov
Valued Contributor

Re: Rand and Peek

Hi!

It's selection random CustomerID

First expression selects random row in customer

Second expression selects CustomerID for selected row above

Highlighted
Partner
Partner

Re: Rand and Peek

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