<?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 AW:Re: Analyzing  time in QlikView in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319513#M1198806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roland,&lt;/P&gt;&lt;P&gt;Yes, it's a known undocumented feature for a while and very popular. I always am very careful joining interval-matched tables, as it just multiplies number of records your main table. I am mostly working with huge data volume sourced from SAP systems, so I do have to worry about size of data and number of records in the tables.&lt;/P&gt;&lt;P&gt;So, if the tables (mainly fact) you are working with is not too big, sure go ahead and left join it, but keeping them as-it-is would not hurt as Synthetic keys are "ok" to have with interval-matched tables.&lt;/P&gt;&lt;P&gt;EDIT: By the way, you can do another left join to put all back to one table, just be careful as mentioned above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Accidents:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;AcID, AcDat, AcTime&lt;BR /&gt;1, 1/1/2010, 8:01:00&lt;BR /&gt;2, 1/7/2010, 9:10:11&lt;BR /&gt;3, 2/1/2011, 13:00:00&lt;BR /&gt;4, 3/4/2011, 17:00:00&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;Bucket:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;TimeFrom, TimeTo, TimeDesc&lt;BR /&gt;00:00:01, 09:00:00, Morning&lt;BR /&gt;09:01:01, 16:00:00, Day&lt;BR /&gt;16:00:01, 23:59:59, Evening&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;LEFT Join (Accidents)&lt;BR /&gt;IntervalMatch(AcTime)&lt;BR /&gt;LOAD TimeFrom, TimeTo RESIDENT Bucket;&lt;BR /&gt;&lt;BR /&gt;LEFT Join (Accidents)&lt;BR /&gt;LOAD * RESIDENT Bucket;&lt;BR /&gt;&lt;BR /&gt;DROP Table Bucket;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Apr 2011 17:25:15 GMT</pubDate>
    <dc:creator>disqr_rm</dc:creator>
    <dc:date>2011-04-10T17:25:15Z</dc:date>
    <item>
      <title>Analyzing  time in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319510#M1198803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm working with accidents database. Each accident has time of occurring (for example: 8:02 am).&lt;/P&gt;&lt;P&gt;I want to analyse the data by this time but then I get many different times, and I want to make it more general (for example: all the accidents from 7:00 am to 12:00 am will be classified as "morning").&lt;/P&gt;&lt;P&gt;How can I do this? someone told me it could be done with ranges or something....&lt;/P&gt;&lt;P&gt;Thnx!&lt;/P&gt;&lt;P&gt;Nitzan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 10:51:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319510#M1198803</guid>
      <dc:creator />
      <dc:date>2011-04-10T10:51:29Z</dc:date>
    </item>
    <item>
      <title>Analyzing  time in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319511#M1198804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Accidents:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;AcID, AcDat, AcTime&lt;BR /&gt;1, 1/1/2010, 8:01:00&lt;BR /&gt;2, 1/7/2010, 9:10:11&lt;BR /&gt;3, 2/1/2011, 13:00:00&lt;BR /&gt;4, 3/4/2011, 17:00:00&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;Bucket:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;TimeFrom, TimeTo, TimeDesc&lt;BR /&gt;00:00:01, 09:00:00, Morning&lt;BR /&gt;09:01:01, 16:00:00, Day&lt;BR /&gt;16:00:01, 23:59:59, Evening&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;IntervalMatch(AcTime)&lt;BR /&gt;LOAD TimeFrom, TimeTo RESIDENT Bucket;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Just put all the fields on the screen and you will see what it is doing. Search here for IntervalMatch for more details on it.&lt;/P&gt;&lt;P&gt;Rakesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 15:37:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319511#M1198804</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2011-04-10T15:37:08Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Analyzing  time in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319512#M1198805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rakesh,&lt;/P&gt;&lt;P&gt;I like your clear and easy to understand exam for IntervalMatch very much (I saw a lot of complicated descriptions yet).&lt;/P&gt;&lt;P&gt;What do you think about joining like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Join (Bucket)&lt;BR /&gt;IntervalMatch(AcTime)&lt;BR /&gt;LOAD . . .&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This simplifies the data modell and I think it should work as fine as yours.&lt;/P&gt;&lt;P&gt;Regards, Roland&lt;/P&gt;&lt;ADDRESS&gt;&lt;BR /&gt;&lt;/ADDRESS&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 17:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319512#M1198805</guid>
      <dc:creator />
      <dc:date>2011-04-10T17:10:29Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Analyzing  time in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319513#M1198806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roland,&lt;/P&gt;&lt;P&gt;Yes, it's a known undocumented feature for a while and very popular. I always am very careful joining interval-matched tables, as it just multiplies number of records your main table. I am mostly working with huge data volume sourced from SAP systems, so I do have to worry about size of data and number of records in the tables.&lt;/P&gt;&lt;P&gt;So, if the tables (mainly fact) you are working with is not too big, sure go ahead and left join it, but keeping them as-it-is would not hurt as Synthetic keys are "ok" to have with interval-matched tables.&lt;/P&gt;&lt;P&gt;EDIT: By the way, you can do another left join to put all back to one table, just be careful as mentioned above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Accidents:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;AcID, AcDat, AcTime&lt;BR /&gt;1, 1/1/2010, 8:01:00&lt;BR /&gt;2, 1/7/2010, 9:10:11&lt;BR /&gt;3, 2/1/2011, 13:00:00&lt;BR /&gt;4, 3/4/2011, 17:00:00&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;Bucket:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;TimeFrom, TimeTo, TimeDesc&lt;BR /&gt;00:00:01, 09:00:00, Morning&lt;BR /&gt;09:01:01, 16:00:00, Day&lt;BR /&gt;16:00:01, 23:59:59, Evening&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;LEFT Join (Accidents)&lt;BR /&gt;IntervalMatch(AcTime)&lt;BR /&gt;LOAD TimeFrom, TimeTo RESIDENT Bucket;&lt;BR /&gt;&lt;BR /&gt;LEFT Join (Accidents)&lt;BR /&gt;LOAD * RESIDENT Bucket;&lt;BR /&gt;&lt;BR /&gt;DROP Table Bucket;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 17:25:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319513#M1198806</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2011-04-10T17:25:15Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Analyzing  time in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319514#M1198807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rakesh for your quick reply &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt;&lt;/P&gt;&lt;P&gt;I've tried your solution and it seems to be working except from one thing -&lt;/P&gt;&lt;P&gt;I entered the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD `Acd_code`,&lt;/P&gt;&lt;P&gt;`Acd_Date`,&lt;/P&gt;&lt;P&gt;year(`Acd_Date`) as Acd_Year,&lt;/P&gt;&lt;P&gt;Month(`Acd_Date`) as Acd_Month,&lt;/P&gt;&lt;P&gt;`Acd_Description`,&lt;/P&gt;&lt;P&gt;`Acd_Environment` as Environment_Code ,&lt;/P&gt;&lt;P&gt;Time(`Acd_hour`) as Acd_Time,&lt;/P&gt;&lt;P&gt;`Acd_House_Num`,&lt;/P&gt;&lt;P&gt;`Acd_Num_of_Injureds`,&lt;/P&gt;&lt;P&gt;`Acd_phone`,&lt;/P&gt;&lt;P&gt;`Acd_Street`,&lt;/P&gt;&lt;P&gt;`Acd_town`,&lt;/P&gt;&lt;P&gt;`Reporter_ID`,&lt;/P&gt;&lt;P&gt;`Reporter_name`,&lt;/P&gt;&lt;P&gt;`Reporter_phone`,&lt;/P&gt;&lt;P&gt;`Reporter_role`;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM Accident;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bucket:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;TimeFrom, TimeTo, TimeDesc&lt;/P&gt;&lt;P&gt;00:00:00, 07:00:00, Night&lt;/P&gt;&lt;P&gt;07:00:01, 12:00:00, Day&lt;/P&gt;&lt;P&gt;12:00:01, 18:00:00, Noon&lt;/P&gt;&lt;P&gt;18:00:01, 23:59:59, Evening&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;And then I've added a pie chart with the dimension TimeDesc and the expression "count (distinct Acd_code)"&lt;/P&gt;&lt;P&gt;Like I said I have the accident table in my database (with all the accident details) and I also have injuries table (in this table the same accident code can appear several times - each time with th id of a different employee....in case of multiple injures accidents). the injuries table and the accident table are connected by the Acd_code. So now it seems that I get the requested time analyse (for day,noon, night and evening) but for the injuries table. This is why I get extra null values beside the correct time analyse numbers (for example: 22-day, 10-night, 15-null).&lt;/P&gt;&lt;P&gt;Can I resolve it somehow?&lt;/P&gt;&lt;P&gt;Tnanx!&lt;/P&gt;&lt;P&gt;Nitzan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 15:50:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319514#M1198807</guid>
      <dc:creator />
      <dc:date>2011-04-11T15:50:49Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: Analyzing  time in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319515#M1198808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nitzan,&lt;/P&gt;&lt;P&gt;because the field "Acd_code" is a key and links two tables together, the counting isn't possible. Here comes a possible workaround:&lt;/P&gt;&lt;P&gt;Load your linking field in both tables A and B twice with two different names eg. Acd_code_A and Acd_code_B. And you still have the link with "Acd_code" from table A to table B.&lt;/P&gt;&lt;P&gt;BTW: I would rename both to $Acd_code_ID to show they are from now on (only) technical IDs to link the tables. In your charts and all other objects you can easily use (eg. count distinct ) Acd_code_A or Acd_code_B (and of course $Acd_code_ID, if that's for some reasons necessary)&lt;/P&gt;&lt;P&gt;Regards, Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 20:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319515#M1198808</guid>
      <dc:creator />
      <dc:date>2011-04-12T20:23:44Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: Analyzing  time in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319516#M1198809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works just fine!! &lt;IMG alt="Geeked" src="http://community.qlik.com/emoticons/emotion-15.gif" /&gt; Thanks to your precious advice!&lt;/P&gt;&lt;P&gt;Really appreciate it.&lt;/P&gt;&lt;P&gt;Nitzan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Apr 2011 19:26:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Analyzing-time-in-QlikView/m-p/319516#M1198809</guid>
      <dc:creator />
      <dc:date>2011-04-17T19:26:25Z</dc:date>
    </item>
  </channel>
</rss>

