<?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: Hours calc in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263178#M99005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See the attachment, this is one approach..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;Eliran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2012 10:00:51 GMT</pubDate>
    <dc:creator>eliran</dc:creator>
    <dc:date>2012-02-08T10:00:51Z</dc:date>
    <item>
      <title>Hours calc</title>
      <link>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263176#M99003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please assist a newby. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was probably asked a few times. I serached, but nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calc hours worked per employee per day. Data is from SQL and very simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 225px;"&gt;&lt;COLGROUP&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="59"&gt;&lt;STRONG&gt; IndivNdx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-left-style: none; border-left-width: initial; border-left-color: initial;" width="39"&gt;&lt;STRONG&gt;In/Out&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-left-style: none; border-left-width: initial; border-left-color: initial;" width="127"&gt;&lt;STRONG&gt;EventTime&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top-style: none; border-top-width: initial; border-top-color: initial;"&gt;3996&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD class="xl67" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;IN&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;02/02/2012&amp;nbsp; 07:52:05 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top-style: none; border-top-width: initial; border-top-color: initial;"&gt;3996&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD class="xl67" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;OUT&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;02/02/2012&amp;nbsp; 04:55:50 PM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top-style: none; border-top-width: initial; border-top-color: initial;"&gt;6632&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD class="xl67" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;IN&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;02/02/2012&amp;nbsp; 08:04:26 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top-style: none; border-top-width: initial; border-top-color: initial;"&gt;6632&lt;/TD&gt;&lt;TD class="xl67" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;&amp;nbsp; OUT&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;02/02/2012&amp;nbsp; 12:14:10 PM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top-style: none; border-top-width: initial; border-top-color: initial;"&gt;6632&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD class="xl67" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;IN&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;02/02/2012&amp;nbsp; 02:41:13 PM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="17" style="border-top-style: none; border-top-width: initial; border-top-color: initial;"&gt;6632&lt;/TD&gt;&lt;TD class="xl67" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;&amp;nbsp; OUT&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top-style: none; border-top-width: initial; border-top-color: initial; border-left-style: none; border-left-width: initial; border-left-color: initial;"&gt;02/02/2012&amp;nbsp; 05:08:36 PM&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 09:47:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263176#M99003</guid>
      <dc:creator />
      <dc:date>2012-02-08T09:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Hours calc</title>
      <link>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263177#M99004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sample table attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 09:51:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263177#M99004</guid>
      <dc:creator />
      <dc:date>2012-02-08T09:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Hours calc</title>
      <link>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263178#M99005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See the attachment, this is one approach..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;Eliran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 10:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263178#M99005</guid>
      <dc:creator>eliran</dc:creator>
      <dc:date>2012-02-08T10:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hours calc</title>
      <link>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263179#M99006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use scritp like this&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss TT';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD-MM-YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff] TT';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Data]:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;IndivNdx,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In-Out,&amp;nbsp;&amp;nbsp;&amp;nbsp; EventTime&lt;/P&gt;&lt;P&gt;3996,&amp;nbsp;&amp;nbsp;&amp;nbsp; IN,&amp;nbsp;&amp;nbsp;&amp;nbsp; 02-02-2012 07:52:05 AM&lt;/P&gt;&lt;P&gt;3996,&amp;nbsp;&amp;nbsp;&amp;nbsp; OUT,&amp;nbsp;&amp;nbsp;&amp;nbsp; 02-02-2012 04:55:50 PM&lt;/P&gt;&lt;P&gt;6632,&amp;nbsp;&amp;nbsp;&amp;nbsp; IN,&amp;nbsp;&amp;nbsp;&amp;nbsp; 02-02-2012 08:04:26 AM&lt;/P&gt;&lt;P&gt;6632,&amp;nbsp;&amp;nbsp;&amp;nbsp; OUT,&amp;nbsp;&amp;nbsp;&amp;nbsp; 02-02-2012 12:14:10 PM&lt;/P&gt;&lt;P&gt;6632,&amp;nbsp;&amp;nbsp;&amp;nbsp; IN,&amp;nbsp;&amp;nbsp;&amp;nbsp; 02-02-2012 02:41:13 PM&lt;/P&gt;&lt;P&gt;6632,&amp;nbsp;&amp;nbsp;&amp;nbsp; OUT,&amp;nbsp;&amp;nbsp;&amp;nbsp; 02-02-2012 05:08:36 PM];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Data1]:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IndivNdx,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIN(EventTime)&amp;nbsp;&amp;nbsp;&amp;nbsp; AS IN&lt;/P&gt;&lt;P&gt;RESIDENT [Data] WHERE [In-Out]='IN' GROUP BY IndivNdx;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN ([Data1])&lt;/P&gt;&lt;P&gt;[Data2]:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IndivNdx,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAX(EventTime)&amp;nbsp;&amp;nbsp;&amp;nbsp; AS OUT&lt;/P&gt;&lt;P&gt;RESIDENT [Data] WHERE [In-Out]='OUT' GROUP BY IndivNdx;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;Next create one Straight Table with IndivNdx as dimension and INTERVAL(OUT-IN,'hh:mm:ss') as expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the sample attached file also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn Cheav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 10:21:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263179#M99006</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2012-02-08T10:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Hours calc</title>
      <link>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263180#M99007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brilliant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks alot. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 13:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hours-calc/m-p/263180#M99007</guid>
      <dc:creator />
      <dc:date>2012-02-08T13:35:33Z</dc:date>
    </item>
  </channel>
</rss>

