<?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 Re: Mathematical problem for clever clocks. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Mathematical-problem-for-clever-clocks/m-p/102874#M16307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;records are already equally distributed and we have a large number of calls per time bucket of interest (minute / hour etc).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;I will have the time to check your solution tomorrow!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;Thank you! Marcel&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Sep 2018 20:34:32 GMT</pubDate>
    <dc:creator>hugmarcel</dc:creator>
    <dc:date>2018-09-06T20:34:32Z</dc:date>
    <item>
      <title>Mathematical problem for clever clocks.</title>
      <link>https://community.qlik.com/t5/QlikView/Mathematical-problem-for-clever-clocks/m-p/102872#M16305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table of service requests which are created constantly and whole day long with unique timestamps (SR_TIME). &lt;BR /&gt;My task now is to select 50% of all requests equally distributed over the whole day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution:&lt;BR /&gt;LOAD SR WHERE MOD(X,2) = 1; // select every 2nd second.&lt;BR /&gt;LOAD SR, AUTONUMBER(SR_TIME) AS X&lt;/P&gt;&lt;P&gt;RESIDENT SRs&lt;BR /&gt;ORDER BY SR_TIME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some "general formula" or load statement (single statement, no loops) which will select 60% or ANY OTHER percentage&lt;BR /&gt;rate of all records equally distributed over the whole day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you! Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 19:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mathematical-problem-for-clever-clocks/m-p/102872#M16305</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2018-09-06T19:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematical problem for clever clocks.</title>
      <link>https://community.qlik.com/t5/QlikView/Mathematical-problem-for-clever-clocks/m-p/102873#M16306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends what you expect for 'equally distributed'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are your input records for the calls already equally distributed, i.e. they show the same time difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, your Solution will not change the distribution, i.e. it will just return every second call, and if the calls show a accumulation around noon, your sample distribution will show the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if your input records are already equally distributed according your requirements, and you have a large number of calls per time bucket of interest (minute / hour etc), you maybe can create a sample like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vSample% = 0.6;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INPUT:&lt;/P&gt;&lt;P&gt;LOAD Recno() as TimeID, Time(Recno()/100) as Time&lt;/P&gt;&lt;P&gt;AutoGenerate 100;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD TimeID, Time, Rowno() as NoSamples&lt;/P&gt;&lt;P&gt;Resident INPUT&lt;/P&gt;&lt;P&gt;Where TimeID *$(vSample%)&amp;gt; Rangesum(Peek('NoSamples'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE INPUT;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 20:25:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mathematical-problem-for-clever-clocks/m-p/102873#M16306</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-09-06T20:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematical problem for clever clocks.</title>
      <link>https://community.qlik.com/t5/QlikView/Mathematical-problem-for-clever-clocks/m-p/102874#M16307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;records are already equally distributed and we have a large number of calls per time bucket of interest (minute / hour etc).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;I will have the time to check your solution tomorrow!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #666666; font-family: 'Helvetica',sans-serif; font-size: 10.5pt;"&gt;Thank you! Marcel&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 20:34:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mathematical-problem-for-clever-clocks/m-p/102874#M16307</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2018-09-06T20:34:32Z</dc:date>
    </item>
  </channel>
</rss>

