<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic QV10 Bug: Sample Load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QV10-Bug-Sample-Load/m-p/167224#M38879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From Manual:&lt;/P&gt;&lt;H4&gt;sample p ( loadstatement | selectstatement )&lt;/H4&gt;&lt;P&gt;where:&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SAMPLE (0.10) LOAD * FROM Table; (This statement would load about 10% of the records in "Table")&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Table1:&lt;BR /&gt;SAMPLE 0.10&lt;BR /&gt;LOAD Rand() AS Random1&lt;BR /&gt;AUTOGENERATE 1000000;&lt;BR /&gt;Table2:&lt;BR /&gt;SAMPLE 0.90&lt;BR /&gt;LOAD Rand() AS Random2&lt;BR /&gt;AUTOGENERATE 1000000;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-2703_sourceID:2703" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-2704_sourceID:2704" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Nov 2010 21:06:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-01T21:06:37Z</dc:date>
    <item>
      <title>QV10 Bug: Sample Load</title>
      <link>https://community.qlik.com/t5/QlikView/QV10-Bug-Sample-Load/m-p/167224#M38879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From Manual:&lt;/P&gt;&lt;H4&gt;sample p ( loadstatement | selectstatement )&lt;/H4&gt;&lt;P&gt;where:&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SAMPLE (0.10) LOAD * FROM Table; (This statement would load about 10% of the records in "Table")&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Table1:&lt;BR /&gt;SAMPLE 0.10&lt;BR /&gt;LOAD Rand() AS Random1&lt;BR /&gt;AUTOGENERATE 1000000;&lt;BR /&gt;Table2:&lt;BR /&gt;SAMPLE 0.90&lt;BR /&gt;LOAD Rand() AS Random2&lt;BR /&gt;AUTOGENERATE 1000000;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-2703_sourceID:2703" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-2704_sourceID:2704" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 21:06:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV10-Bug-Sample-Load/m-p/167224#M38879</guid>
      <dc:creator />
      <dc:date>2010-11-01T21:06:37Z</dc:date>
    </item>
  </channel>
</rss>

