<?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 Counting working days in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-working-days/m-p/149092#M27303</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 would need to count the amount of working days between certain date range. The issue is that I have a Table A in which there are FromDate and ToDate -fields to determine the date range. Then I have a Table B in which there is a TransDate -field that contains the information about each date whether it is a working day or not. How can I define in the script that I should get a count of working days (Count(TransDate)) between FromDate and ToDate? In addition, in the Table A, there is a AmountMST -field which value I need to divide by the amount of working days. The issue is presented and explained below in more detail:&lt;/P&gt;&lt;P&gt;Table A:&lt;BR /&gt;FromDate&lt;BR /&gt;ToDate&lt;BR /&gt;AmountMST (this needs to be divided by the amount of working days)&lt;BR /&gt;EmplID&lt;BR /&gt;&lt;BR /&gt;Table C:&lt;BR /&gt;EmplID&lt;BR /&gt;CalendarID&lt;BR /&gt;&lt;BR /&gt;Table B:&lt;BR /&gt;CalendarID&lt;BR /&gt;TransDate (we need to count all the days that are working days between&lt;BR /&gt; any given FromDate and ToDate values)&lt;BR /&gt;WorkTimeControl (the value of this field needs to be 0 in order to&lt;BR /&gt; get rid of free days. That way only working days are&lt;BR /&gt; left and we can get their count)&lt;BR /&gt;&lt;BR /&gt;The issue in more detail is the following:&lt;BR /&gt;We have forecasted a certain labor cost (AmountMST) for each employee for a certain date range (FromDate - ToDate). We want to be able to determine a labor cost per day. For that we need to determine the amount&lt;BR /&gt;of working days in that date range. We can figure it out by first identifying employee's calendar through Table C. Then in table B, get all the working days for that employee as we set WorkTimeControl to 0. However, I find it difficult to define that we need to have a count of working days from a certain date range. Can anybody help with that?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Petteri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jul 2009 02:33:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-13T02:33:59Z</dc:date>
    <item>
      <title>Counting working days</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-working-days/m-p/149092#M27303</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 would need to count the amount of working days between certain date range. The issue is that I have a Table A in which there are FromDate and ToDate -fields to determine the date range. Then I have a Table B in which there is a TransDate -field that contains the information about each date whether it is a working day or not. How can I define in the script that I should get a count of working days (Count(TransDate)) between FromDate and ToDate? In addition, in the Table A, there is a AmountMST -field which value I need to divide by the amount of working days. The issue is presented and explained below in more detail:&lt;/P&gt;&lt;P&gt;Table A:&lt;BR /&gt;FromDate&lt;BR /&gt;ToDate&lt;BR /&gt;AmountMST (this needs to be divided by the amount of working days)&lt;BR /&gt;EmplID&lt;BR /&gt;&lt;BR /&gt;Table C:&lt;BR /&gt;EmplID&lt;BR /&gt;CalendarID&lt;BR /&gt;&lt;BR /&gt;Table B:&lt;BR /&gt;CalendarID&lt;BR /&gt;TransDate (we need to count all the days that are working days between&lt;BR /&gt; any given FromDate and ToDate values)&lt;BR /&gt;WorkTimeControl (the value of this field needs to be 0 in order to&lt;BR /&gt; get rid of free days. That way only working days are&lt;BR /&gt; left and we can get their count)&lt;BR /&gt;&lt;BR /&gt;The issue in more detail is the following:&lt;BR /&gt;We have forecasted a certain labor cost (AmountMST) for each employee for a certain date range (FromDate - ToDate). We want to be able to determine a labor cost per day. For that we need to determine the amount&lt;BR /&gt;of working days in that date range. We can figure it out by first identifying employee's calendar through Table C. Then in table B, get all the working days for that employee as we set WorkTimeControl to 0. However, I find it difficult to define that we need to have a count of working days from a certain date range. Can anybody help with that?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Petteri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2009 02:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-working-days/m-p/149092#M27303</guid>
      <dc:creator />
      <dc:date>2009-07-13T02:33:59Z</dc:date>
    </item>
    <item>
      <title>Counting working days</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-working-days/m-p/149093#M27304</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 don't really understand your problem but try to use the &lt;STRONG&gt;networkdays&lt;/STRONG&gt; formula.&lt;/P&gt;&lt;P&gt;Regard's&lt;/P&gt;&lt;P&gt;Amar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2009 11:24:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-working-days/m-p/149093#M27304</guid>
      <dc:creator>amars</dc:creator>
      <dc:date>2009-07-13T11:24:50Z</dc:date>
    </item>
    <item>
      <title>Counting working days</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-working-days/m-p/149094#M27305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the &lt;STRONG&gt;networkdays()&lt;/STRONG&gt; function. Refer to help manual for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2009 13:57:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-working-days/m-p/149094#M27305</guid>
      <dc:creator />
      <dc:date>2009-07-13T13:57:38Z</dc:date>
    </item>
  </channel>
</rss>

