Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created a data table. How do I show 50 random rows from a field in the table? Every time user refreshes the data, the table should show only 50 randomly selected values from that field.
@qlikwiz123 You can debug it with 50 as a row limit
Do you want to do this in script or a chart?
-Rob
Hi, either way works for me. Doing at chart level might slow down the chart load but I would like to try both and see which one performs better 🙂
For script, you can do something like:
Sample:
LOAD
Value as Sample
Resident Data
Where Rand() > 0.8
and RowNo() <= 50;
You can play with the Rand() limit but the RowNo() will limit you to 50 rows.
For chart, I'm not sure how you can limit to 50, but you could get a set of random values as:
Aggr(if (Rand() > 0.8, Value), Value)
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com