<?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 business rule using a loop? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474851#M689263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I struggling to create a loop to translate a specific business rule.&lt;/P&gt;&lt;P&gt;I need to create a rule in Qlikview that loops trough the the dates that an employee called sick.&lt;/P&gt;&lt;P&gt;If the last sickness date of that employee&amp;nbsp; is smaller than 28 days,&amp;nbsp; then the duration of the last sickness day,&lt;/P&gt;&lt;P&gt;should be accumulated with the duration of the last sickness duration.&lt;/P&gt;&lt;P&gt;If the sickness between the previous sickness date is longer than 28 days, then the duration of the last sickness is being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really hope the above is clear. My apologize for my English.&lt;/P&gt;&lt;P&gt;To clarify the above, please look excel file. and the QV file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any questions or if the above is not clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Nov 2013 11:05:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-11-03T11:05:27Z</dc:date>
    <item>
      <title>business rule using a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474851#M689263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I struggling to create a loop to translate a specific business rule.&lt;/P&gt;&lt;P&gt;I need to create a rule in Qlikview that loops trough the the dates that an employee called sick.&lt;/P&gt;&lt;P&gt;If the last sickness date of that employee&amp;nbsp; is smaller than 28 days,&amp;nbsp; then the duration of the last sickness day,&lt;/P&gt;&lt;P&gt;should be accumulated with the duration of the last sickness duration.&lt;/P&gt;&lt;P&gt;If the sickness between the previous sickness date is longer than 28 days, then the duration of the last sickness is being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really hope the above is clear. My apologize for my English.&lt;/P&gt;&lt;P&gt;To clarify the above, please look excel file. and the QV file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any questions or if the above is not clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Nov 2013 11:05:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474851#M689263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-03T11:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: business rule using a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474852#M689264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find attached an app that hopefully answers your request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Nov 2013 16:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474852#M689264</guid>
      <dc:creator />
      <dc:date>2013-11-03T16:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Re: business rule using a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474853#M689265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jean-Pierre,&lt;/P&gt;&lt;P&gt;Sorry for the late response.&lt;/P&gt;&lt;P&gt;Thanks for your help! Unfortunately this works on 1 employee. When I apply your script to my table I get strange results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at employeeID= 5240. This person called sick 10 times, often within the 28 days limitation. However looking at the field 'cumulativedurationstart' I don't get the disired results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 12:56:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474853#M689265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-05T12:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: business rule using a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474854#M689266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I checked your data, it contained duplicate rows.&lt;/P&gt;&lt;P&gt;I reapplied same script using "distinct" and it seems to give logical results.&lt;/P&gt;&lt;P&gt;You can check the attached app for the results and compare later when you reload (note that i'm reading your temp.qvw as binary in the beginning of the script).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 19:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474854#M689266</guid>
      <dc:creator />
      <dc:date>2013-11-05T19:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: business rule using a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474855#M689267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jean-Pierre,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;That did the job!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 17:13:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/business-rule-using-a-loop/m-p/474855#M689267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-06T17:13:30Z</dc:date>
    </item>
  </channel>
</rss>

