<?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 Help needed for Time calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201482#M59551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi QV-users.&lt;/P&gt;&lt;P&gt;Referring to my attached Excel file I have to make some calculations. I have made a novice solution in Excel but the file turns out to be so large that my computer runs out of memory when it calculate all rows.&lt;/P&gt;&lt;P&gt;Hopefully you can help me with a script to solve my problems:&lt;/P&gt;&lt;P&gt;1: Time spent in each line (EndDate-StartDate). If EndDate is empty then SysDate-StartDate. So I can sum time spent in each department. If the Status is BER or HBER then the time spent should be set to 0 (zero) from the StartDate with one of those Status and the following rows, e.g. in Order1_SubNo1 the time should be calculatede for StatusRowNo 1 and 2 but row 3 and 4 should be set to 0 (zero).&lt;/P&gt;&lt;P&gt;2: A complete view to see if an order is OK in all status rows, e.g. Order2_SubNo1 is the only order with OK in all status rows. If it's OK then the field value should be "OK" else "Fail".&lt;/P&gt;&lt;P&gt;3: Time spent from StartDate in StatusRowNo 1 to the StartDate where HBER or BER is shown as status for the first time. If they are not shown then the StartDate in StatusRowNo 1 to the EndDate in the last StatusRowNo or if not exist then to SysDate. This should be done for all OrderNo and SubNo.&lt;/P&gt;&lt;P&gt;4: A view to see which department fails an order, e.g. if department D fails in Order2_SubNo2 then this department should be "credited" as FailDepartment for all OrderNo_SubNo. It doesn't matter if another department fails later on, e.g. department A in Order2_SubNo2, then the FailDepartment is still department D.&lt;/P&gt;&lt;P&gt;Results should be:&lt;/P&gt;&lt;P&gt;Time per order:&lt;BR /&gt;OrderNo1_SubNo1 = 26 days&lt;BR /&gt;OrderNo2_SubNo1 = 56 days&lt;BR /&gt;OrderNo2_SubNo2 = 14 days&lt;/P&gt;&lt;P&gt;Time per department:&lt;BR /&gt;A = 44&lt;BR /&gt;B = 0&lt;BR /&gt;C = 52&lt;BR /&gt;D = 0&lt;/P&gt;&lt;P&gt;Time per FailDepartment:&lt;BR /&gt;A = 0&lt;BR /&gt;B = 26&lt;BR /&gt;C = 0&lt;BR /&gt;D = 14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Johnni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Sep 2010 10:42:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-09-15T10:42:57Z</dc:date>
    <item>
      <title>Help needed for Time calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201482#M59551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi QV-users.&lt;/P&gt;&lt;P&gt;Referring to my attached Excel file I have to make some calculations. I have made a novice solution in Excel but the file turns out to be so large that my computer runs out of memory when it calculate all rows.&lt;/P&gt;&lt;P&gt;Hopefully you can help me with a script to solve my problems:&lt;/P&gt;&lt;P&gt;1: Time spent in each line (EndDate-StartDate). If EndDate is empty then SysDate-StartDate. So I can sum time spent in each department. If the Status is BER or HBER then the time spent should be set to 0 (zero) from the StartDate with one of those Status and the following rows, e.g. in Order1_SubNo1 the time should be calculatede for StatusRowNo 1 and 2 but row 3 and 4 should be set to 0 (zero).&lt;/P&gt;&lt;P&gt;2: A complete view to see if an order is OK in all status rows, e.g. Order2_SubNo1 is the only order with OK in all status rows. If it's OK then the field value should be "OK" else "Fail".&lt;/P&gt;&lt;P&gt;3: Time spent from StartDate in StatusRowNo 1 to the StartDate where HBER or BER is shown as status for the first time. If they are not shown then the StartDate in StatusRowNo 1 to the EndDate in the last StatusRowNo or if not exist then to SysDate. This should be done for all OrderNo and SubNo.&lt;/P&gt;&lt;P&gt;4: A view to see which department fails an order, e.g. if department D fails in Order2_SubNo2 then this department should be "credited" as FailDepartment for all OrderNo_SubNo. It doesn't matter if another department fails later on, e.g. department A in Order2_SubNo2, then the FailDepartment is still department D.&lt;/P&gt;&lt;P&gt;Results should be:&lt;/P&gt;&lt;P&gt;Time per order:&lt;BR /&gt;OrderNo1_SubNo1 = 26 days&lt;BR /&gt;OrderNo2_SubNo1 = 56 days&lt;BR /&gt;OrderNo2_SubNo2 = 14 days&lt;/P&gt;&lt;P&gt;Time per department:&lt;BR /&gt;A = 44&lt;BR /&gt;B = 0&lt;BR /&gt;C = 52&lt;BR /&gt;D = 0&lt;/P&gt;&lt;P&gt;Time per FailDepartment:&lt;BR /&gt;A = 0&lt;BR /&gt;B = 26&lt;BR /&gt;C = 0&lt;BR /&gt;D = 14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Johnni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Sep 2010 10:42:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201482#M59551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-15T10:42:57Z</dc:date>
    </item>
    <item>
      <title>Help needed for Time calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201483#M59552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johnni,&lt;/P&gt;&lt;P&gt;As per my understanding of your questions, i have attached a sample qv file. Just let me know what else you required. When Status BER or HBER i made it Zero, but i dont understand, in your excel file attached, some of the status OK have Zeros, so just confirm it.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ren&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width:121pt;border-collapse:collapse;" width="161"&gt;&lt;COLGROUP&gt;&lt;COL style="width:46pt;mso-width-source:userset;mso-width-alt:2230;" width="61" /&gt;&lt;COL style="width:41pt;mso-width-source:userset;mso-width-alt:2011;" width="55" /&gt;&lt;COL style="width:34pt;mso-width-source:userset;mso-width-alt:1645;" width="45" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl65" height="20" style="width:46pt;height:15pt;background-color:transparent;border:#ece9d8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="width:41pt;background-color:transparent;border:#ece9d8;" width="55"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="width:34pt;background-color:transparent;border:#ece9d8;" width="45"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Sep 2010 13:01:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201483#M59552</guid>
      <dc:creator>renjithpl</dc:creator>
      <dc:date>2010-09-16T13:01:08Z</dc:date>
    </item>
    <item>
      <title>Help needed for Time calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201484#M59553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Johni,&lt;/P&gt;&lt;P&gt;As per my understanding of your questions, i have attached a sample qv file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Sep 2010 13:15:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201484#M59553</guid>
      <dc:creator>renjithpl</dc:creator>
      <dc:date>2010-09-16T13:15:40Z</dc:date>
    </item>
    <item>
      <title>Help needed for Time calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201485#M59554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ren,&lt;/P&gt;&lt;P&gt;thanks for your help so far. Unfortunately I can't see your qvd-attachment in this post so please check whether you remembered to attach it or not.&lt;/P&gt;&lt;P&gt;Regarding my Excel file the time calculation must be zero from the day HBER or BER occur for the first time and for the following StatusRowNo.&lt;/P&gt;&lt;P&gt;Hopefully you can figure it out.&lt;/P&gt;&lt;P&gt;Johnni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Sep 2010 13:15:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201485#M59554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-16T13:15:50Z</dc:date>
    </item>
    <item>
      <title>Help needed for Time calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201486#M59555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now I can see your Calculation.qvw in the new post.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I will take at look at it and post back soon.&lt;/P&gt;&lt;P&gt;Johnni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Sep 2010 13:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-needed-for-Time-calculation/m-p/201486#M59555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-16T13:17:37Z</dc:date>
    </item>
  </channel>
</rss>

