<?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: Sorting events into timeslots in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102588#M628865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MinutesOfTimeslot is a parameter for the length in minutes of a timeslot.When i choose this equal to 15, i will have 672 timslots in a week, with 10 - 1008 timeslots ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Aug 2016 20:01:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-08-28T20:01:08Z</dc:date>
    <item>
      <title>Sorting events into timeslots</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102586#M628863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;I load some million events from a psql database. The events occures over the day at any time and the entity contains a datetime-field. I want to count the events occuring at different times and days of a week, aggregated over some years. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore i want to divide the 10080 minutes of a week in a numberd sequence of 10080/n slots, numbered from 1 to 10080/n. Example: MinutesOfTimeslot=15, timeslot nr.1 goes from 00:00:00 to 00:14:59 on monday an the last nr.672 from 23:45:00 to 23:59:59 on sunday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think to do the calculation during the load-process like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO PostgreSQL64;&lt;/P&gt;&lt;P&gt;LOAD "eventTime",&lt;/P&gt;&lt;P&gt;slot(enventTime,MinutesOfTimeslot) as slot_nr;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM "events";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not very experienced in SQL or QLIKVIEW and don't know if there are any existing functions fullfilling my wishes. Later it could be interesting to consider vacation and public holidays to compare similar days or weeks over the years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Aug 2016 17:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102586#M628863</guid>
      <dc:creator />
      <dc:date>2016-08-28T17:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting events into timeslots</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102587#M628864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post the data for &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;MinutesOfTimeslot&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Aug 2016 19:11:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102587#M628864</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-08-28T19:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting events into timeslots</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102588#M628865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MinutesOfTimeslot is a parameter for the length in minutes of a timeslot.When i choose this equal to 15, i will have 672 timslots in a week, with 10 - 1008 timeslots ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Aug 2016 20:01:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102588#M628865</guid>
      <dc:creator />
      <dc:date>2016-08-28T20:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting events into timeslots</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102589#M628866</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;one solution might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_230676_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/135921_QlikCommunity_Thread_230676_Pic1.JPG" style="height: 433px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_230676_Pic2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/135922_QlikCommunity_Thread_230676_Pic2.JPG" style="height: 348px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_230676_Pic4.JPG" class="image-4 jive-image" height="244" src="https://community.qlik.com/legacyfs/online/135933_QlikCommunity_Thread_230676_Pic4.JPG" style="height: 244px; width: 131.73px;" width="132" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_230676_Pic3.JPG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/135932_QlikCommunity_Thread_230676_Pic3.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14725150901896090" jivemacro_uid="_14725150901896090"&gt;
&lt;P&gt;tabEvents:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interval(Floor(eventTimestamp-WeekStart(eventTimestamp),'00:01'),'d hh:mm') as eventTime;&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as eventID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp(Now()-Rand()*1000) as eventTimestamp&lt;/P&gt;
&lt;P&gt;AutoGenerate 1000;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabEventTime:&lt;/P&gt;
&lt;P&gt;LOAD Distinct&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; eventTime,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IterNo() as MinutesOfTimeslot,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(eventTime*1440/IterNo()) as slot_nr,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interval(Floor(eventTime,IterNo()/1440),'d hh:mm') as slot_time&lt;/P&gt;
&lt;P&gt;Resident tabEvents&lt;/P&gt;
&lt;P&gt;While IterNo() &amp;lt;= 1440;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 00:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102589#M628866</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-08-30T00:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting events into timeslots</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102590#M628867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with a free desktop version. Therefor i cannot read your example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i first tried to understand the code. After that i implemented, based on your example a solution. This works, but i saw some results i don't really understand in the moment, and i have to look for. It seems, there are some problems with the format of my event-timestamp and the functions ceil and floor returns values i cannot comprehend. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore i recognized, that my solution works, but is very slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ruediger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 11:02:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-events-into-timeslots/m-p/1102590#M628867</guid>
      <dc:creator />
      <dc:date>2016-09-01T11:02:04Z</dc:date>
    </item>
  </channel>
</rss>

