<?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 Strange problem with Set_Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Strange-problem-with-Set-Expression/m-p/478845#M178874</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;I have, in the course of fixing a larger issue, come across one relatively small, but annoying thing:&lt;/P&gt;&lt;P&gt;- I have a master_calendar in a qvs file that is loaded into every app.&lt;/P&gt;&lt;P&gt;- This master_calendar is currently for one year only&lt;/P&gt;&lt;P&gt;- In the calendar, there is a binary field returning 1 for working_days (Mo-Fri) and 0 for weekends. Public holidays are not accounted&lt;BR /&gt;&amp;nbsp;&amp;nbsp; for.&lt;/P&gt;&lt;P&gt;- Based on this, I have two variables: Days_YTD (all days) and Workdays_YTD (Mo-Fri only).&lt;/P&gt;&lt;P&gt;=&amp;gt; The code for these is as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(= '&amp;gt;=' &amp;amp; makedate(year(today()), 1, 1))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(= '&amp;lt;' &amp;amp; DATE(v_today_num))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; }&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Werktag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;[for all days YTD]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(= '&amp;gt;=' &amp;amp; makedate(year(today()), 1, 1))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(= '&amp;lt;' &amp;amp; DATE(v_today_num))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; }&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Werktag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;[for the workdays]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Strangely, when I edit the qvs file to make the calendar run for three years (by editing the start_date, incl. testing the code in a textbox)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt; The variables suddenly change and display about three times the nr. of days?!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;There must be some error in my set_expressions - but which? I can't spot it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can anybody help me, please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Sep 2013 15:09:31 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2013-09-25T15:09:31Z</dc:date>
    <item>
      <title>Strange problem with Set_Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-problem-with-Set-Expression/m-p/478845#M178874</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;I have, in the course of fixing a larger issue, come across one relatively small, but annoying thing:&lt;/P&gt;&lt;P&gt;- I have a master_calendar in a qvs file that is loaded into every app.&lt;/P&gt;&lt;P&gt;- This master_calendar is currently for one year only&lt;/P&gt;&lt;P&gt;- In the calendar, there is a binary field returning 1 for working_days (Mo-Fri) and 0 for weekends. Public holidays are not accounted&lt;BR /&gt;&amp;nbsp;&amp;nbsp; for.&lt;/P&gt;&lt;P&gt;- Based on this, I have two variables: Days_YTD (all days) and Workdays_YTD (Mo-Fri only).&lt;/P&gt;&lt;P&gt;=&amp;gt; The code for these is as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(= '&amp;gt;=' &amp;amp; makedate(year(today()), 1, 1))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(= '&amp;lt;' &amp;amp; DATE(v_today_num))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; }&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Werktag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;[for all days YTD]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(= '&amp;gt;=' &amp;amp; makedate(year(today()), 1, 1))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(= '&amp;lt;' &amp;amp; DATE(v_today_num))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; }&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Werktag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;[for the workdays]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Strangely, when I edit the qvs file to make the calendar run for three years (by editing the start_date, incl. testing the code in a textbox)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt; The variables suddenly change and display about three times the nr. of days?!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;There must be some error in my set_expressions - but which? I can't spot it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can anybody help me, please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 15:09:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-problem-with-Set-Expression/m-p/478845#M178874</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-25T15:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Strange problem with Set_Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-problem-with-Set-Expression/m-p/478846#M178875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You shouldn't use the same field twice within the same set modifier. Combine your two date ranges into one search expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=makedate(year(today()), 1, 1))&amp;lt;$(=&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE(v_today_num))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; }&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Werktag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 15:13:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-problem-with-Set-Expression/m-p/478846#M178875</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-09-25T15:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Strange problem with Set_Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-problem-with-Set-Expression/m-p/478847#M178876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool! Didn't know that yet.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 12:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-problem-with-Set-Expression/m-p/478847#M178876</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-26T12:08:54Z</dc:date>
    </item>
  </channel>
</rss>

