<?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: Networkdays function to change non working days from saturday-sunday to thursday-friday in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415737#M491461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes ofcourse thats what i did&lt;/P&gt;&lt;P&gt;but that doesnt solve the problem of the large table case&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2015 12:23:05 GMT</pubDate>
    <dc:creator>wizardo</dc:creator>
    <dc:date>2015-01-08T12:23:05Z</dc:date>
    <item>
      <title>Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415731#M491455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement where we need to calculate the no of days between start date and end data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can use the &lt;/P&gt;&lt;H4 style="background-color: #c0c0c0; font-size: 1.4444em; color: #252525; font-family: Arial;"&gt;networkdays( &lt;SPAN style="font-size: 17px; font-style: italic;"&gt;start:date, end_date {, holiday}&lt;/SPAN&gt; )&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this function automatically excludes saturday and sunday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i need is to exclude Thurday and Friday as non working days and include the saturday and sunday as working day while doing the calculation.&lt;/P&gt;&lt;P&gt;Our client working days are Sat-Wed&amp;nbsp; and Thu-Fri as weekOff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how can i use an logic to calculate the exact no of days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Please advise how to achieve it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Your suggestion is much appreciate&lt;/SPAN&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 20:56:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415731#M491455</guid>
      <dc:creator />
      <dc:date>2012-09-17T20:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415732#M491456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *, if( WeekDay(DateField) = 'Thu' or WeekDay(DateField) = 'Fri', 0, 1) as Flag from tabkename;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Use count(Flag) as expression. You can achieve your requirement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 21:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415732#M491456</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-09-17T21:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415733#M491457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you only have dates for start and end date, you will first need to somehow create a date record for each day in your period. If you could calculate the networkdays in the script, you can do it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set TimestampFormat = 'M/D/YY hh:mm TT';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vHol = '41160,41162';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;INPUT:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *, recno() as ID INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DT1, DT2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;9/1/12 11:08 AM,9/8/12 2:57 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/18/12 09:20 AM,8/20/12 01:13 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/17/12 09:20 AM,8/20/12 01:13 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/17/12 09:20 AM,8/19/12 01:13 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;6/27/12 12:41 PM,&amp;nbsp;&amp;nbsp;&amp;nbsp; 7/6/12 4:38 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;6/29/12 4:45 PM,&amp;nbsp;&amp;nbsp;&amp;nbsp; 7/6/12 4:19 PM&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Create a record per day in your periods&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMP:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&amp;nbsp; ID,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Date(daystart(DT1)+iterno()-1) as Date&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident INPUT&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while daystart(DT2) &amp;gt;= daystart(DT1)+iterno()-1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// calculate the sum of days in your periods, that are not a Thu or Fri, or part of your Holidays (set variable vHol)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;left join (INPUT) LOAD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ID,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;count(Date) as Networkdays&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident TMP &lt;STRONG&gt;where (WeekDay(Date)&amp;lt;3 or WeekDay(Date)&amp;gt;4) and not match(Date,$(vHol))&lt;/STRONG&gt; group by ID;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table TMP;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Weekday() function returns 3 for Thursday and 4 for a Friday.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 21:44:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415733#M491457</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-09-17T21:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415734#M491458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the promp response to my query.&lt;/P&gt;&lt;P&gt;The solution provided by you was easy to understand and implement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vasim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 09:10:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415734#M491458</guid>
      <dc:creator />
      <dc:date>2012-09-18T09:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415735#M491459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;as i see it it works but it creates raws for each day in between the dates in each row of the source table.&lt;/P&gt;&lt;P&gt;if my source table is big and in avg i have 5-10 days diff in each row it means ill need to create a table 5-10 times larger.&lt;/P&gt;&lt;P&gt;this might be a problem&lt;/P&gt;&lt;P&gt;any other ways?&lt;/P&gt;&lt;P&gt; i need networkdays function to give sunday-thursday as working days (excluding friday and saterday)&lt;/P&gt;&lt;P&gt;Wizardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 08:36:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415735#M491459</guid>
      <dc:creator>wizardo</dc:creator>
      <dc:date>2015-01-07T08:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415736#M491460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you could use an approach like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(distinct if(match(weekday(Date), 0,1,2,3,6), Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 14:35:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415736#M491460</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-01-07T14:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415737#M491461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes ofcourse thats what i did&lt;/P&gt;&lt;P&gt;but that doesnt solve the problem of the large table case&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 12:23:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415737#M491461</guid>
      <dc:creator>wizardo</dc:creator>
      <dc:date>2015-01-08T12:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415738#M491462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It was meant as calculation within the gui. Further you didn't need create flags or calculations over the fact-table - better is to use a master-calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 12:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415738#M491462</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-01-08T12:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415739#M491463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what will the master-calendar help here?&lt;/P&gt;&lt;P&gt;i have a fact with 2 date in each row and i need to calculate the working days between these dates. &lt;/P&gt;&lt;P&gt;i see no way to use the master-calendar in this scenario&lt;/P&gt;&lt;P&gt;normally id use the function NETWORKDAYS() but this functions assumes week where Monday is first day of the week and something that can work with weeks where Sunday is first day and Friday and Saturday are non working days.&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;H5 class="simple"&gt;swuehl&lt;/H5&gt;&lt;P&gt;solution was the best i have found so far &lt;/P&gt;&lt;P&gt;(except the issue with large fact table about which i asked)&lt;/P&gt;&lt;P&gt;Wizardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 16:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415739#M491463</guid>
      <dc:creator>wizardo</dc:creator>
      <dc:date>2015-01-08T16:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415740#M491464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know what do you want to do with these networkdays-values. If you don't calculate these values further within the script it could be better to perform such calculation on a small amount of data (restricted by selections) within the gui.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless you could create an expression with a main-logic like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(enddate - startdate) - floor((enddate - startdate) / 7)&lt;/P&gt;&lt;P&gt;with an additional considering from the weekday from the startdate and enddate and a little bit fine-tuning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have built such expression some time ago but actually couldn't find it. Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 16:40:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415740#M491464</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-01-08T16:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Networkdays function to change non working days from saturday-sunday to thursday-friday</title>
      <link>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415741#M491465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Best way is take a primary key field from your data model tables..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And write the expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(count(primarykey)&amp;gt;0 ,count(distinct date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then it will display the working days of your customer data regardless sun,wed...etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 09:28:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Networkdays-function-to-change-non-working-days-from-saturday/m-p/415741#M491465</guid>
      <dc:creator />
      <dc:date>2016-04-05T09:28:24Z</dc:date>
    </item>
  </channel>
</rss>

