<?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: Time reporting clock in / clock out (Multiple entries) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Time-reporting-clock-in-clock-out-Multiple-entries/m-p/1041812#M350548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it would be good to see how the data model looks like, e.g. how in and out fields are related.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that they are located in a single table with an addtional person id:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SET TimeFormat='hh:mm:ss';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;STRONG&gt; Interval(Out-In) as Duration&lt;/STRONG&gt; INLINE [&lt;BR /&gt;Person, In, Out&lt;BR /&gt;A,06:49:00,16:05:00 &lt;BR /&gt;A,19:52:00,20:45:00 &lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now just create a chart in the frontend with dimension Person and as expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum(Duration)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;returned result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 196px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0.5pt solid gainsboro; background-color: whitesmoke;" width="98"&gt;&lt;STRONG style="color: #333333; font-family: Tahoma;"&gt;Person&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: gainsboro gainsboro gainsboro #333333; background-color: whitesmoke;" width="98"&gt;&lt;STRONG style="color: #333333; font-family: Tahoma;"&gt;Sum(Duration)&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black black gainsboro; background-color: whitesmoke;"&gt;&lt;STRONG style="font-family: Tahoma;"&gt; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black gainsboro gainsboro; background-color: whitesmoke;"&gt;&lt;STRONG style="font-family: Tahoma;"&gt;10:09:00&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; background-color: white;"&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;10:09:00&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also calculate the durations in the frontend, if needed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Interval( Sum( Out-In))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Mar 2016 09:14:20 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-03-22T09:14:20Z</dc:date>
    <item>
      <title>Time reporting clock in / clock out (Multiple entries)</title>
      <link>https://community.qlik.com/t5/QlikView/Time-reporting-clock-in-clock-out-Multiple-entries/m-p/1041811#M350547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If a person clocks in and out for the first time (Same day)&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; width: 270px;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;TD class="xl65" height="17" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-size: 13.3333px; font-family: inherit;" width="93"&gt;In:06:49:00&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-style: solid solid solid none; border-top-color: black; border-right-color: black; border-bottom-color: black; font-style: inherit; font-size: 13.3333px; font-family: inherit;" width="103"&gt;Out:16:05:00&lt;/TD&gt;&lt;TD align="right" class="xl66" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-size: 13.3333px; font-family: inherit;" width="74"&gt;Time:09:16:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;and then clock in for the second time:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; width: 270px;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;TD class="xl65" height="17" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-size: 13.3333px; font-family: inherit;" width="93"&gt;In: 19:52:00&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-style: solid solid solid none; border-top-color: black; border-right-color: black; border-bottom-color: black; font-style: inherit; font-size: 13.3333px; font-family: inherit;" width="103"&gt;Out: 20:45:00&lt;/TD&gt;&lt;TD align="right" class="xl66" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-size: 13.3333px; font-family: inherit;" width="74"&gt;Time:00:53:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The actual active time will be 10:09 hours &amp;amp; min and not between 06:49-20:45 as some have given me suggestions of using max and min time.&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;How do I calculate the active time for each day when multiple reports exists?&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 20:57:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-reporting-clock-in-clock-out-Multiple-entries/m-p/1041811#M350547</guid>
      <dc:creator />
      <dc:date>2016-03-21T20:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Time reporting clock in / clock out (Multiple entries)</title>
      <link>https://community.qlik.com/t5/QlikView/Time-reporting-clock-in-clock-out-Multiple-entries/m-p/1041812#M350548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it would be good to see how the data model looks like, e.g. how in and out fields are related.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that they are located in a single table with an addtional person id:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SET TimeFormat='hh:mm:ss';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;STRONG&gt; Interval(Out-In) as Duration&lt;/STRONG&gt; INLINE [&lt;BR /&gt;Person, In, Out&lt;BR /&gt;A,06:49:00,16:05:00 &lt;BR /&gt;A,19:52:00,20:45:00 &lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now just create a chart in the frontend with dimension Person and as expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum(Duration)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;returned result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 196px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0.5pt solid gainsboro; background-color: whitesmoke;" width="98"&gt;&lt;STRONG style="color: #333333; font-family: Tahoma;"&gt;Person&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: gainsboro gainsboro gainsboro #333333; background-color: whitesmoke;" width="98"&gt;&lt;STRONG style="color: #333333; font-family: Tahoma;"&gt;Sum(Duration)&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black black gainsboro; background-color: whitesmoke;"&gt;&lt;STRONG style="font-family: Tahoma;"&gt; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black gainsboro gainsboro; background-color: whitesmoke;"&gt;&lt;STRONG style="font-family: Tahoma;"&gt;10:09:00&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; background-color: white;"&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;10:09:00&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Tahoma;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also calculate the durations in the frontend, if needed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Interval( Sum( Out-In))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 09:14:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-reporting-clock-in-clock-out-Multiple-entries/m-p/1041812#M350548</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-22T09:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Time reporting clock in / clock out (Multiple entries)</title>
      <link>https://community.qlik.com/t5/QlikView/Time-reporting-clock-in-clock-out-Multiple-entries/m-p/1041813#M350549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Hi, that is exactly what I'm looking for. I attach my document because the date looks a little bit different compared to the above.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 14:14:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-reporting-clock-in-clock-out-Multiple-entries/m-p/1041813#M350549</guid>
      <dc:creator />
      <dc:date>2016-03-24T14:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Time reporting clock in / clock out (Multiple entries)</title>
      <link>https://community.qlik.com/t5/QlikView/Time-reporting-clock-in-clock-out-Multiple-entries/m-p/1041814#M350550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, your IN and OUT are not located on the same record. If you have an identifier per event, you can use this identifier to bring both timestamps on the same record, maybe using JOIN or ApplyMap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use inter record functions like Previous() in the script to check the previous record and access values of the previous input table record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached (using a binary load only because I don't have access to your sources).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 14:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-reporting-clock-in-clock-out-Multiple-entries/m-p/1041814#M350550</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-24T14:33:36Z</dc:date>
    </item>
  </channel>
</rss>

