<?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 by hour in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527582#M197153</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; you have to create a chart with a calculated dimension&lt;/P&gt;&lt;P&gt;=hour([Submit Date.Time])&lt;/P&gt;&lt;P&gt;and the expression Count(distinct IncidentID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/47331_pastedImage_0.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Oct 2013 12:32:38 GMT</pubDate>
    <dc:creator>bbi_mba_76</dc:creator>
    <dc:date>2013-10-08T12:32:38Z</dc:date>
    <item>
      <title>Count by hour</title>
      <link>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527581#M197152</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'm looking to create to show how many incidents were raised per hour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample data&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;IncidentID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Submit Date.Time&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;101123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;08/10/2013 09:31:46&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;101124&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;08/10/2013 09:45:12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101125&lt;/TD&gt;&lt;TD&gt;08/10/2013 11:23:01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101126&lt;/TD&gt;&lt;TD&gt;08/10/2013 12:32:54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101127&lt;/TD&gt;&lt;TD&gt;08/10/2013 13:15:45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101128&lt;/TD&gt;&lt;TD&gt;08/10/2013 15:20:59&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101129&lt;/TD&gt;&lt;TD&gt;08/10/2013 16:22:51&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101130&lt;/TD&gt;&lt;TD&gt;08/10/2013 17:28:54&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like the chart to have hours as the X axis and a count of incidents as the Y axis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 12:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527581#M197152</guid>
      <dc:creator>darren_dixon</dc:creator>
      <dc:date>2013-10-08T12:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count by hour</title>
      <link>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527582#M197153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; you have to create a chart with a calculated dimension&lt;/P&gt;&lt;P&gt;=hour([Submit Date.Time])&lt;/P&gt;&lt;P&gt;and the expression Count(distinct IncidentID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/47331_pastedImage_0.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 12:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527582#M197153</guid>
      <dc:creator>bbi_mba_76</dc:creator>
      <dc:date>2013-10-08T12:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count by hour</title>
      <link>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527583#M197154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check sample&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 12:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527583#M197154</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2013-10-08T12:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count by hour</title>
      <link>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527584#M197155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have a lot of records it's best to split the datetime into a date and time field and also create an hour field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; IncidentID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; floor([Submit Date.Time]) as [Submit Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; frac([Submit Date.Time]) as [Submit Time],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; hour([Submit Date.Time]) as [Submit Hour],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;EM&gt;...other fields...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;From &lt;EM&gt;...source...&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then use the new Submit Hour field as dimension in your chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 12:47:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527584#M197155</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-10-08T12:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count by hour</title>
      <link>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527585#M197156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As G says, if you have a lot of records it will require a lot of calculation during selections if you do the calculation in the object, and it will be a better practice to create the time-field during load.&lt;/P&gt;&lt;P&gt;Not so important if there are just a small count of records, though..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 12:51:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527585#M197156</guid>
      <dc:creator>kim_rormark</dc:creator>
      <dc:date>2013-10-08T12:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Count by hour</title>
      <link>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527586#M197157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although this is correct, I would really recommend doing the calculation part in the load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From G in the previous post:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; IncidentID&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; floor([Submit Date.Time]) as [Submit Date],&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; frac([Submit Date.Time]) as [Submit Time],&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; hour([Submit Date.Time]) as [Submit Hour],&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: inherit;"&gt;&lt;EM&gt;...other fields...&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From &lt;SPAN style="font-family: inherit;"&gt;&lt;EM&gt;...source...&lt;/EM&gt;&lt;/SPAN&gt;;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Then, use the [Submit Hour] as the dimension and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count(IncidentID) as the expression. I would not recommend using the DISTINCT function in the count, unless you know that the same IncidentID could appear more than once. This is also something that could potentionally give you a performance "boost".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember, this is especially important if there are a large amount of records - but I will &lt;SPAN style="text-decoration: underline;"&gt;always&lt;/SPAN&gt; try to do best practice before easy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 13:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-by-hour/m-p/527586#M197157</guid>
      <dc:creator>kim_rormark</dc:creator>
      <dc:date>2013-10-09T13:35:42Z</dc:date>
    </item>
  </channel>
</rss>

