Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

QV10 Bug: Sample Load

From Manual:

sample p ( loadstatement | selectstatement )

where:

p is an arbitrary expression which valuates to a number larger than 0 and lower or equal to 1. The number indicates the probability for a given record to be read.

Example:

SAMPLE (0.10) LOAD * FROM Table; (This statement would load about 10% of the records in "Table")

I'm attaching screenshots from a QV document that autogenerates 1,000,000 numbers in two tables. One loads a sample of 10% the other a sample of 90%. You can see from my screenshots that in QlikView10 the probability is calculated incorrectly (looks like 1-p). The value "p" should be the probability that a record is read, not the probability that the record is skipped.


Table1:
SAMPLE 0.10
LOAD Rand() AS Random1
AUTOGENERATE 1000000;
Table2:
SAMPLE 0.90
LOAD Rand() AS Random2
AUTOGENERATE 1000000;


error loading image

error loading image