<?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: Exclude days in an expression using a field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074107#M928683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that's fine. The expression editor syntax checker tries to evaluate it as an expression. Well, it's not a valid expression. But it is simply a comma separated list of values which is what it should be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Mar 2016 11:40:47 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-03-15T11:40:47Z</dc:date>
    <item>
      <title>Exclude days in an expression using a field</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074102#M928678</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;Is there a way to exclude certain dates in an expression without having to type them out every time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To calculate the amount of working days in a month, I use the following expression:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=NetWorkDays(MakeDate(only(Year),only(Month),1),MonthEnd(MakeDate(only(Year),only(Month),1)), &lt;STRONG&gt;'11/11/2015', '25/12/2015', '01/01/2016', '28/03/2016'&lt;/STRONG&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I would like to use some kind of new field containing all of the dates I would like to exclude, so I could use something like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=NetWorkDays(MakeDate(only(Year),only(Month),1),MonthEnd(MakeDate(only(Year),only(Month),1)), &lt;STRONG&gt;'holidays'&lt;/STRONG&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the new field being: &lt;STRONG&gt;holidays = '11/11/2015', '25/12/2015', '01/01/2016', '28/03/2016'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074102#M928678</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude days in an expression using a field</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074103#M928679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create a variable that contains the list of holidays:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET &lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;vHolidays = '11/11/2015', '25/12/2015', '01/01/2016', '28/03/2016';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then use that variable in the expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;=NetWorkDays(MakeDate(only(Year),only(Month),1),MonthEnd(MakeDate(only(Year),only(Month),1)),$(&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;vHolidays)&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If you have a table that contains the holiday dates you can collect them from there:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD concat(distinct chr(39 &amp;amp; MyHolidayDate &amp;amp; chr(30)) as HolidayList From MyHolidayTable;&lt;/P&gt;&lt;P&gt;LET vHolidays = peek('HolidayList');&lt;/P&gt;&lt;P&gt;Drop Table Temp;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 10:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074103#M928679</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-15T10:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude days in an expression using a field</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074104#M928680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this specific case, you can't use a fied for the holidays, it needs to be a comma separated list of arguments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use a variable that dollar-sign expand to this argument list:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open variable overview and create a new variable &lt;EM&gt;vHolidays &lt;/EM&gt;with value (no leading equal sign in the value definition!):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'11/11/2015', '25/12/2015', '01/01/2016', '28/03/2016'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use it like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;NetWorkDays(MakeDate(only(Year),only(Month),1),MonthEnd(MakeDate(only(Year),only(Month),1)),&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(vHolidays)&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 10:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074104#M928680</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-15T10:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude days in an expression using a field</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074105#M928681</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;Hope below link will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-5314"&gt;Find Net Working Days&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 10:14:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074105#M928681</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2016-03-15T10:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude days in an expression using a field</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074106#M928682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the way to add the variable, 'cus it gives me red lines already..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="118040" alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/118040_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: IT WORKS!! Thanks a bunch Swuehl, this is exactly what I needed!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 11:35:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074106#M928682</guid>
      <dc:creator />
      <dc:date>2016-03-15T11:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude days in an expression using a field</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074107#M928683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that's fine. The expression editor syntax checker tries to evaluate it as an expression. Well, it's not a valid expression. But it is simply a comma separated list of values which is what it should be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 11:40:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-days-in-an-expression-using-a-field/m-p/1074107#M928683</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-15T11:40:47Z</dc:date>
    </item>
  </channel>
</rss>

