<?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: Question: Is it possible to use a field as a parameter for Networkdays() function? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/46480#M3174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually this is the first practical use I have had for the Evaluate() function ... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/shocked.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jun 2018 08:42:05 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2018-06-20T08:42:05Z</dc:date>
    <item>
      <title>Question: Is it possible to use a field as a parameter for Networkdays() function?</title>
      <link>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/46477#M3171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I load a simple table with 3 fields: StartDate (Depot In) , EndDate (Depot Out)&amp;nbsp; , and coma separated list of Holiday dates (HL) (example line):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="netwokdays.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/205602_netwokdays.JPG" style="height: 64px; width: 620px;" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate Networkdays during load script from this table:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;LOAD&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;CUSTOMER_COUNTRY,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Networkdays([Depot In],[Depot Out], HL) as NetDays&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Resident holidayTable;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Help for the function says:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="script_token" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-weight: bold; font-size: 12px; color: #0f0f0f;"&gt;networkdays (&lt;/SPAN&gt;&lt;SPAN class="bnf_token" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; color: #0f0f0f;"&gt;start_date, end_date [, holiday]&lt;/SPAN&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT: The script result does not exclude holidays, despite the field HL is a list of coma separated dates. I get the same result, as if i did not provide the list of holiday dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the correct way of passing the function argument from an existing field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlik help just states: holiday list is " &lt;SPAN style="color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif; font-size: 14px;"&gt;Holiday periods to exclude from working days...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; margin: 0 0 5px; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;separated by commas.&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: 14px; margin: 0 0 5px; font-weight: bold; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;&lt;SPAN class="autonumber"&gt;Example: &lt;/SPAN&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;'25/12/2013', '26/12/2013', '31/12/2013', '01/01/2014'&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: 14px; margin: 0 0 5px; font-weight: bold; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: 14px; margin: 0 0 5px; font-weight: bold; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;&lt;STRONG&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;My field HL is exactly the coma separated list as in the example.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: 14px; margin: 0 0 5px; font-weight: bold; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;&lt;STRONG&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: 14px; margin: 0 0 5px; font-weight: bold; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;&lt;STRONG&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;Is it a bug in the function, or the HL field must be passed in a different way?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: 14px; margin: 0 0 5px; font-weight: bold; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;&lt;STRONG&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: 14px; margin: 0 0 5px; font-weight: bold; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;&lt;STRONG&gt;I want to avoid using variable/cycle through the data, because this is very unproductive script when one works with millions of rows of data. (I do not want the script as in the example :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: 14px; margin: 0 0 5px; font-weight: bold; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/106943"&gt;https://community.qlik.com/thread/106943&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="example" data-mc-autonum="Example: " style="font-size: 14px; margin: 0 0 5px; font-weight: bold; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif;"&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 11:17:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/46477#M3171</guid>
      <dc:creator>mszetyinszki</dc:creator>
      <dc:date>2018-06-19T11:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Is it possible to use a field as a parameter for Networkdays() function?</title>
      <link>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/46478#M3172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are trying to pass the list of holidays as a single parameter. The Networkdays() function will only allow multiple holidays to be passed as multiple parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a way around this by using the Evaluate() function however. Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;holidayTable: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;Depot In;Depot Out;HL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;1.5.2018; 31.5.2018;'1.5.2018','17.5.2018'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;1.12.2017; 31.12.2017;'24.12.2018','25.12.2017','26.12.2017','31.12.2017'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;] (delimiter is ';', no quotes);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;D2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;NOCONCATENATE LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; [Depot In],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; [Depot Out],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;STRONG&gt;Evaluate&lt;/STRONG&gt;('Networkdays('&amp;amp;Chr(39)&amp;amp;[Depot In]&amp;amp;Chr(39)&amp;amp;','&amp;amp;Chr(39)&amp;amp;[Depot Out]&amp;amp;Chr(39)&amp;amp;','&amp;amp;HL&amp;amp;')') AS NWD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;RESIDENT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; holidayTable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;DROP TABLE holidayTable;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 19:42:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/46478#M3172</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-06-19T19:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Is it possible to use a field as a parameter for Networkdays() function?</title>
      <link>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/46479#M3173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect solution!. Thanks for the tip!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 06:54:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/46479#M3173</guid>
      <dc:creator>mszetyinszki</dc:creator>
      <dc:date>2018-06-20T06:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Is it possible to use a field as a parameter for Networkdays() function?</title>
      <link>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/46480#M3174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually this is the first practical use I have had for the Evaluate() function ... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/shocked.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 08:42:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/46480#M3174</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-06-20T08:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Is it possible to use a field as a parameter for Networkdays() function?</title>
      <link>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/1780477#M60705</link>
      <description>&lt;P&gt;That is amazing! I spent hours of trying everything and finally got that Evaluate trick!&amp;nbsp; Thank you! Brilliant solution!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 10:10:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Question-Is-it-possible-to-use-a-field-as-a-parameter-for/m-p/1780477#M60705</guid>
      <dc:creator>spetkov009</dc:creator>
      <dc:date>2021-02-05T10:10:02Z</dc:date>
    </item>
  </channel>
</rss>

