<?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 Count of Working Days From Today in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392143#M146267</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;Need some guidance, I want to add to my script which builds the calendar table a field which lets me know for a specific date how many 'working' days have gone so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example, below I have Date, I also have if the day is a Working Day e.g. even though 01/01/2013 was a Tuesday. What I want to derive is a count of how many working days have been since that date. So today we are on the 3rd Jan, so Working Days From Today is 0, Yesterday (2nd Jan), was a working day too so is 1 day behind and hence 1, 1st Jan was nota&amp;nbsp; working day, so count stays at 1, 31st Dec was so count goes up to 2 etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tomorrow, all the counts go up by one as today becomes 4th Jan, so 3rd no longer is 0, it's 1 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, the reason I need this is so I can use this to work out for example the last 20 days sales etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="267" style="border: 1px solid #000000; width: 353px; height: 267px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Working Day&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Working Days From Today&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;27/12/2012&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;28/12/2012&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;29/12/2012&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;30/12/2012&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;31/12/2012&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/01/2013&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/01/2013&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03/01/2013&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2013&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05/01/2013&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've added a simple Qlikview app with the above calendar table if it helps to use this to demonstrate how it can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My thanks in advance for any help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jan 2013 18:21:23 GMT</pubDate>
    <dc:creator>derekjones</dc:creator>
    <dc:date>2013-01-03T18:21:23Z</dc:date>
    <item>
      <title>Count of Working Days From Today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392143#M146267</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;Need some guidance, I want to add to my script which builds the calendar table a field which lets me know for a specific date how many 'working' days have gone so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example, below I have Date, I also have if the day is a Working Day e.g. even though 01/01/2013 was a Tuesday. What I want to derive is a count of how many working days have been since that date. So today we are on the 3rd Jan, so Working Days From Today is 0, Yesterday (2nd Jan), was a working day too so is 1 day behind and hence 1, 1st Jan was nota&amp;nbsp; working day, so count stays at 1, 31st Dec was so count goes up to 2 etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tomorrow, all the counts go up by one as today becomes 4th Jan, so 3rd no longer is 0, it's 1 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, the reason I need this is so I can use this to work out for example the last 20 days sales etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="267" style="border: 1px solid #000000; width: 353px; height: 267px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Working Day&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Working Days From Today&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;27/12/2012&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;28/12/2012&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;29/12/2012&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;30/12/2012&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;31/12/2012&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/01/2013&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/01/2013&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03/01/2013&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2013&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05/01/2013&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've added a simple Qlikview app with the above calendar table if it helps to use this to demonstrate how it can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My thanks in advance for any help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2013 18:21:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392143#M146267</guid>
      <dc:creator>derekjones</dc:creator>
      <dc:date>2013-01-03T18:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Working Days From Today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392144#M146268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd use the networkingdays function and use a table (or variable) for the holidays to feed to the networkingdays function. See attached qvw. One solution is to use the script to calculate the working days. The possible disadvantage is you need to reload daily. If you do that anyway, then no problem. The other solution is to calculate the working days in the chart itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2013 19:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392144#M146268</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-01-03T19:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Working Days From Today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392145#M146269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use this expression in chart&lt;/P&gt;&lt;P&gt;=NumMax(NetWorkDays(Date#(Date,'DD/MM/YYYY'), Today(),$(=Chr(39) &amp;amp;Concat({&amp;lt;WorkingDay={'N'}&amp;gt;} Date,Chr(39)&amp;amp;','&amp;amp;Chr(39)) &amp;amp;Chr(39)))-1,0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2013 20:40:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392145#M146269</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-01-03T20:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Working Days From Today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392146#M146270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defintely a workable solution. I don't actually have a list of the holidays (I basically have a calendar file with the days flagged as working days or not, including weekends) I can't see it being too difficult creating a list of all the non weekend holidays to achieve this. I will have a go at this today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I reload daily, so my intention is to include this 'WorkingDaysFromToday' field in my calendar table to reduce the amount of calculation required in the application as this is to be used on reports using thousands of sales records to derive the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 09:02:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392146#M146270</guid>
      <dc:creator>derekjones</dc:creator>
      <dc:date>2013-01-04T09:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Working Days From Today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392147#M146271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class="replyToName"&gt;Celambarasan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, the expression works a treat without the need of storing the nonweekend holidays in a variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am however concerned the concat looks like it could be quite processing intensive over larger datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My actual live application has a 4 year calendar and over 4 million sales records that have a date linked to the calendar, I will test this to see if there will be any performance issues in using this expression in my app. If so, I'll use Gysbert's suggestion above which will incorporate the calculation inside the calendar table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your elegant solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 09:15:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/392147#M146271</guid>
      <dc:creator>derekjones</dc:creator>
      <dc:date>2013-01-04T09:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Working Days From Today</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/1628037#M446225</link>
      <description>&lt;P&gt;We can try this simple script as well:&lt;/P&gt;&lt;P&gt;Remaining working days in Month:&lt;/P&gt;&lt;P&gt;NetWorkDays(Date(today(), 'MM/DD/YYYY'),MonthEnd(Date(today(), 'MM/DD/YYYY'))) as RemainingMonthWorkingDays&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 11:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Working-Days-From-Today/m-p/1628037#M446225</guid>
      <dc:creator>Yogi</dc:creator>
      <dc:date>2019-09-25T11:39:37Z</dc:date>
    </item>
  </channel>
</rss>

