<?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 networkday() question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205030#M61690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you're providing values for the parameters, it's using commas as the separator. Since it is a dollar sign expansion, that part is occurring before anything else. So I believe your second parameter is getting prematurely cut off right before the formatting, which would keep it from working.&lt;/P&gt;&lt;P&gt;I don't THINK you need to keep a consistent format for the networkdays function, as long as it's a date or a number that can be interpreted as a date. So the easy solution would be to remove the formatting and just use this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;$(customnetworkdays('1-1-2010',min(datevalue)))&lt;/P&gt;&lt;P&gt;Does that work? If not, I can add a customnetworkdays "function" to my sample file and try to figure out better what's going on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Apr 2010 21:57:15 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-04-12T21:57:15Z</dc:date>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205022#M61682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=DATE(DATE#(RIGHT(datum,8),'YYYYMMDD')-3,'D-M-YYYY')&lt;/P&gt;&lt;P&gt;this give me a date 3 days back .. i need 3 workdays back.&lt;/P&gt;&lt;P&gt;I'v read the networkdays() in the reference manual. But then i need a second date (which i dont have)&lt;/P&gt;&lt;P&gt;is there another option?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 23:04:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205022#M61682</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-04-06T23:04:21Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205023#M61683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;you can try this expression.&lt;/P&gt;&lt;P&gt;date(if(weekday(today()) = 'Mon' or weekday(today()) = 'Tue' or weekday(today()) = 'Wed', today()-5, today()-3))&lt;/P&gt;&lt;P&gt;That gives the date 3 working days previous to today. you can replace today with a date, if you have one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 23:50:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205023#M61683</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-04-06T23:50:17Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205024#M61684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;firstworkdate(YourDate,4)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 00:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205024#M61684</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-04-07T00:23:51Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205025#M61685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;firstworkdate&lt;A id="firstworkdate" name="firstworkdate"&gt;&lt;/A&gt;( &lt;EM&gt;end_date, no_of_workdays {, holiday&lt;/EM&gt;} )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks .. looks very nice .. gonna test it .. holiday can also be a table? or need they be in the expression?&lt;/P&gt;&lt;P&gt;(want to use this function on more then one place, and dont want to update all if needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 21:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205025#M61685</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-04-07T21:06:05Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205026#M61686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Amien wrote:holiday can also be a table? or need they be in the expression?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'm not sure. I've never used it. I would HOPE that you could define a field that holds all of your holidays, and then just put the field in the function, but I don't know if you can, and the examples show dates listed explicitly in the expression. If not, maybe there's some way to use concat(HolidayDate,',') to build the list, and somehow trick QlikView into doing a $ expansion or in some other way think you've explicitly listed them all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 21:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205026#M61686</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-04-07T21:42:47Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205027#M61687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;holidays in table is not working .. not even with CHR(39) &amp;amp; concat(HolidayDate, CHR(39)&amp;amp; ',' &amp;amp; CHR(39)) &amp;amp; CHR(39)&lt;/P&gt;&lt;P&gt;Guess i have to do it to hard way .. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 10:18:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205027#M61687</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-04-08T10:18:11Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205028#M61688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There MUST be a way to do it without needing to write every single holiday date in the expression. That's just tedious.&lt;/P&gt;&lt;P&gt;My first thought is to do a count of holiday days in the date range and subtract them, but that can't work because you don't know the date range UNTIL you've accounted for the holiday days.&lt;/P&gt;&lt;P&gt;My next thought was to generate your own "function" to do it from your holiday table. OK, that seems to work. Build the function like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Holidays]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Holiday&lt;BR /&gt;3/15/2010&lt;BR /&gt;3/10/2010&lt;BR /&gt;];&lt;BR /&gt;SET customfirstworkdate = 'firstworkdate($1,$2';&lt;BR /&gt;FOR I = 0 TO noofrows('Holidays')-1&lt;BR /&gt; LET customfirstworkdate = customfirstworkdate &amp;amp; ',' &amp;amp; num(peek('Holiday',I,'Holidays'));&lt;BR /&gt;NEXT I&lt;BR /&gt;LET customfirstworkdate = customfirstworkdate &amp;amp; ')';&lt;/P&gt;&lt;P&gt;And then use it like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;$(customfirstworkdate(EndDate,NoOfWorkdays))&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;There might be a better way. But at least you won't have to manually maintain the list of holidays. You can just load it from the normal source of the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 18:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205028#M61688</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-04-08T18:36:20Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205029#M61689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;=$(customnetworkdays('1-1-2010','1-2-2010'))&lt;/P&gt;&lt;P&gt;this works .. but this doesnt:&lt;/P&gt;&lt;P&gt;=$(customnetworkdays('1-1-2010',DATE(DATE#(MIN(datevalue),'YYYYMMDD'),'D-M-YYYY')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 21:47:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205029#M61689</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-04-12T21:47:19Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205030#M61690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you're providing values for the parameters, it's using commas as the separator. Since it is a dollar sign expansion, that part is occurring before anything else. So I believe your second parameter is getting prematurely cut off right before the formatting, which would keep it from working.&lt;/P&gt;&lt;P&gt;I don't THINK you need to keep a consistent format for the networkdays function, as long as it's a date or a number that can be interpreted as a date. So the easy solution would be to remove the formatting and just use this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;$(customnetworkdays('1-1-2010',min(datevalue)))&lt;/P&gt;&lt;P&gt;Does that work? If not, I can add a customnetworkdays "function" to my sample file and try to figure out better what's going on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 21:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205030#M61690</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-04-12T21:57:15Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205031#M61691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that gives output .. but a very big number .. nothing that i need.&lt;/P&gt;&lt;P&gt;i thought that date conversion was needed because i'v set: SET DateFormat='D-M-YYYY'&lt;/P&gt;&lt;P&gt;also tried to get the date correct using LEFT/MID/RIGHT .. no result.&lt;/P&gt;&lt;P&gt;also tried to convert the date in the load script ($1 and $2).. also not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 22:40:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205031#M61691</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-04-12T22:40:02Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205032#M61692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;customfirstworkdate is basicly the same as customnetworkdays.. only&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;SET customnetworkdays = 'networkdays($1,$2';&lt;BR /&gt;FOR I = 0 TO noofrows('Holidays')-1&lt;BR /&gt; LET customnetworkdays = customnetworkdays &amp;amp; ',' &amp;amp; num(peek('Holiday',I,'Holidays'));&lt;BR /&gt;NEXT I&lt;BR /&gt;LET customnetworkdays = customnetworkdays &amp;amp; ')';&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 22:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205032#M61692</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-04-12T22:42:15Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205033#M61693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, looks like at least my explanation of the problem appears to have been correct. When I build your new "function" and use it, it does indeed hack off the expression right before the formatting.&lt;/P&gt;&lt;P&gt;However, removing the formatting like I suggested fixes it in my file. I built the function, and I'm doing this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;$(customnetworkdays('1/1/2010',min(Date)))&lt;/P&gt;&lt;P&gt;It's returning 46 for a min(Date) of March 5, 2008, which is before any of my custom holidays. Seems like the right number. I'm going to add in Jan 1 and Feb 15 as holidays. The number drops to 44, as expected.&lt;/P&gt;&lt;P&gt;So... I guess I don't know what's going wrong in your version. Attached is my updated file. Hopefully you can figure it out from there. If not, can you post a sample file demonstrating the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 23:29:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205033#M61693</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-04-12T23:29:59Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205034#M61694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm working with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Dates]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date&lt;BR /&gt;20100305&lt;BR /&gt;20100312&lt;BR /&gt;20100317&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;When [Dates] have the correct notation .. then its working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 08:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205034#M61694</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-04-13T08:24:36Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205035#M61695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;double post&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 08:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205035#M61695</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-04-13T08:24:38Z</dc:date>
    </item>
    <item>
      <title>networkday() question</title>
      <link>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205036#M61696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i added the DATE(Date#) as additional field in my load script .. works fine .. thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 08:35:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/networkday-question/m-p/205036#M61696</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2010-04-14T08:35:17Z</dc:date>
    </item>
  </channel>
</rss>

