Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Different random samples

Dear all,

I am trying to create a random sample of values stored in a list box (Änderungsbelegnr). The user is supposed to decide on the sample size by entering a certain value in an Input Box.

I already managed to create a random sample according to what is entered into the Input Box.

However, I need this random sample to change everytime the user enters a value into the Input Box.

What happens right now is that the random sample stays the same when the sample size is kept the same.

Meaning entering "3" in my Input box twice in a row will give me the same three random values.

I need them to be different though.

This is my current expression for the random sample:

=Concat(If( Aggr(Rank(Rand()) <= vSampleSize, Änderungsbelegnr), Änderungsbelegnr, Null()), ', ') 

Any ideas?

Help very much appreciated!

Regards,

Daniela

0 Replies