<?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: Count #records between two periods of the day (time) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633895#M677737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #008080;"&gt;=Count({$&amp;lt;[Incident creation time]={"&amp;lt;=$(=(8/24))"}&amp;gt;} distinct [Incident ID])&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2014 09:11:19 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2014-05-30T09:11:19Z</dc:date>
    <item>
      <title>Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633893#M677735</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;Does anyone know what is wrong with the following expression?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #008080;"&gt;&lt;EM&gt;=Count({$&amp;lt;[Incident creation time]={"&amp;lt;=$(=time(8/24))"}&amp;gt;} distinct [Incident ID])&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The goal would be to find the number of records that have been created before 8h00 (A.M). The chart return records, but definately not the correct ones...&lt;/P&gt;&lt;P&gt;The ultimate goal would be to figure out how many records are present for which the creation time was either&lt;/P&gt;&lt;P&gt;- between 00h00 AM and 08h00 AM or&lt;/P&gt;&lt;P&gt;- between 06h00 PM and 24h00 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ps: I tried the set analysis builder but that didn't work out either (no records found).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Maarten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 08:58:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633893#M677735</guid>
      <dc:creator />
      <dc:date>2014-05-30T08:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633894#M677736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess it would be something related to time format mismatch. Could you post your sample qvw with sample data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 09:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633894#M677736</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-30T09:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633895#M677737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #008080;"&gt;=Count({$&amp;lt;[Incident creation time]={"&amp;lt;=$(=(8/24))"}&amp;gt;} distinct [Incident ID])&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 09:11:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633895#M677737</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-30T09:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633896#M677738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem is the company policy doesn't allow me to post the cloud, but I'll try to isolate the problem to a seperate cloud. Keep you posted. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:02:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633896#M677738</guid>
      <dc:creator />
      <dc:date>2014-05-30T10:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633897#M677739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this as well before posting this thread, but didn't work either (even when casting the time to a numeric value).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:03:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633897#M677739</guid>
      <dc:creator />
      <dc:date>2014-05-30T10:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633898#M677740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See this: &lt;A href="http://community.qlik.com/docs/DOC-1290" title="http://community.qlik.com/docs/DOC-1290"&gt;Preparing examples for Upload - Reduction and D... | Qlik Community&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:12:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633898#M677740</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-30T10:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633899#M677741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Added a sample to the main posting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:14:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633899#M677741</guid>
      <dc:creator />
      <dc:date>2014-05-30T10:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633900#M677742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does it works with an if?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count(if (&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #008080;"&gt;[Incident creation time]&lt;/EM&gt;&amp;lt;8/24, distinct [Incident ID]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:14:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633900#M677742</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-30T10:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633901#M677743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternatively you can create a Shift field in the load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *, &lt;STRONG&gt;ceil( [Incident creation time]*3)&lt;/STRONG&gt; as Shift&lt;/P&gt;&lt;P&gt;from .... ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your set analysis expression would then become &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #008080;"&gt;&lt;EM&gt;=Count({$&amp;lt;[Shift]={1,3}&amp;gt;} distinct [Incident ID]) &lt;/EM&gt;&lt;/SPAN&gt;to find the incidents created between 00h00 AM and 08h00 AM or between 06h00 PM and 24h00 PM &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you'll need to use the time# function if your time field contains string values instead of numeric day fractions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:16:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633901#M677743</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-05-30T10:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633902#M677744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately not. No resulting records at all (even when casting everything to "num")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:23:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633902#M677744</guid>
      <dc:creator />
      <dc:date>2014-05-30T10:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633903#M677745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load the time field using time() rather than date(), like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Time&lt;/STRONG&gt;(icdt_CreationTime,'hh:mm') as [Incident Creation Time]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:40:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633903#M677745</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-30T10:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633904#M677746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gysbert,&lt;/P&gt;&lt;P&gt;I tried your proposal as well but that seems to result in a count always equal to 1, regardless the linked record.&lt;/P&gt;&lt;P&gt;Thanks either way for your input!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Maarten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:40:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633904#M677746</guid>
      <dc:creator />
      <dc:date>2014-05-30T10:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633905#M677747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried that as well...&lt;/P&gt;&lt;P&gt;Ps: new cloud uploaded (this time with small set of data)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633905#M677747</guid>
      <dc:creator />
      <dc:date>2014-05-30T10:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633906#M677748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, it should have been like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Time&lt;/STRONG&gt;(&lt;STRONG&gt;Frac&lt;/STRONG&gt;(icdt_CreationTime),'hh:mm') as [Incident Creation Time]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:55:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633906#M677748</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-30T10:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633907#M677749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your time field doesn't times, but timestamps (a.k.a. datetimes). So you need to use the frac function to get the time part of the timestamp:&lt;/P&gt;&lt;P&gt;ceil(frac([Incident Creation Time])*3)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 11:16:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633907#M677749</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-05-30T11:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Count #records between two periods of the day (time)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633908#M677750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that did the job!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 11:51:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-between-two-periods-of-the-day-time/m-p/633908#M677750</guid>
      <dc:creator />
      <dc:date>2014-05-30T11:51:25Z</dc:date>
    </item>
  </channel>
</rss>

