<?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 Random Sample in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Random-Sample/m-p/2064056#M1223375</link>
    <description>&lt;P&gt;I have a table in Qlikview containing customer data and their status. I want to add a button to pick 3 random customers in the table for the manager to do a manual control. Preferably I would like to have 3 random customers in the 3 different statuses available. What would be the best approach?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Apr 2023 07:55:58 GMT</pubDate>
    <dc:creator>Linus42</dc:creator>
    <dc:date>2023-04-25T07:55:58Z</dc:date>
    <item>
      <title>Random Sample</title>
      <link>https://community.qlik.com/t5/QlikView/Random-Sample/m-p/2064056#M1223375</link>
      <description>&lt;P&gt;I have a table in Qlikview containing customer data and their status. I want to add a button to pick 3 random customers in the table for the manager to do a manual control. Preferably I would like to have 3 random customers in the 3 different statuses available. What would be the best approach?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 07:55:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Random-Sample/m-p/2064056#M1223375</guid>
      <dc:creator>Linus42</dc:creator>
      <dc:date>2023-04-25T07:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Random Sample</title>
      <link>https://community.qlik.com/t5/QlikView/Random-Sample/m-p/2064411#M1223391</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the load script, add RecNo() as field:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;BR /&gt;RecNo() as Rec;&lt;BR /&gt;LOAD CustomerID,&lt;BR /&gt;CustomerName,&lt;BR /&gt;[Case ID],&lt;BR /&gt;Status,&lt;BR /&gt;[Sales Date],&lt;BR /&gt;[Sales person]&lt;BR /&gt;FROM&lt;BR /&gt;[C:\Users\Krrish\Desktop\Comm\sampledata.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;
&lt;P&gt;you can create three variables in the button:&amp;nbsp;&lt;BR /&gt;vSetRand1 = ceil(Rand()*0.1*now()/1000)&lt;BR /&gt;vSetRand2 = ceil(Rand()*0.15*now()/1000)&lt;BR /&gt;vSetRand3 = ceil(Rand()*0.2*now()/1000)&lt;/P&gt;
&lt;P&gt;Add Action to the button: &lt;BR /&gt;'Select in field' = Rec&lt;BR /&gt;Value = ='(' &amp;amp; $(vSetRand1) &amp;amp; '|' &amp;amp; $(vSetRand2) &amp;amp; '|' &amp;amp; $(vSetRand3) &amp;amp; ')'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snip.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/105797i98D3EF103D4D113A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snip.PNG" alt="Snip.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;PSA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PSA&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 16:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Random-Sample/m-p/2064411#M1223391</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2023-04-25T16:51:14Z</dc:date>
    </item>
  </channel>
</rss>

