<?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: Set Analysis : 2 conditions on same field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-2-conditions-on-same-field/m-p/1047213#M638193</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you must be right about it simply not working at all &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I'm surprised though if it's a formatting issue, because it works with the * in between. Thank you Gysbert for your clarification.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Mar 2016 08:12:18 GMT</pubDate>
    <dc:creator>emmanueld</dc:creator>
    <dc:date>2016-03-23T08:12:18Z</dc:date>
    <item>
      <title>Set Analysis : 2 conditions on same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-2-conditions-on-same-field/m-p/1047211#M638189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have in my Qlikview a few set analyses having 2 conditions on the same field, like for instance "Date &amp;gt; X AND Date &amp;lt; Y", and I am wondering what is the difference between the two following syntaxes:&lt;/P&gt;&lt;P&gt;Date = {"&amp;gt;=$(v_Today)"}*{"&amp;lt;=$(v_variable)"}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Date = {"&amp;gt;=$(v_Today) &amp;lt;=$(v_variable)"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;After running a few tests, I feel like the second syntax sometimes works like an "AND" and sometimes like an "OR", why is that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Actual case :&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;This seems to work (Formatted date is a YYYYMMDD-formatted string, just as the two variables, calculated in the script):&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;FormattedDate = {"&amp;gt;=$(v_DateToday) &amp;lt;=$(v_DateSixMonths)"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;But this doesn't, it behaves like a "OR":&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;FormattedMonth = {"&amp;gt;=$(=min(START_DATE)) &amp;lt;=$(=max(END_DATE))"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;and I had to correct it by&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;FormattedMonth = {"&amp;gt;=$(=min(START_DATE))"} * {"&amp;lt;=$(=max(END_DATE))"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt; (Formatted month is a YYYYMM-formatted string, and START_DATE and END_DATE are two YYYYMM-formatted ID fields, impacted by the selection of the equivalent labels in a Multi box)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 15:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-2-conditions-on-same-field/m-p/1047211#M638189</guid>
      <dc:creator>emmanueld</dc:creator>
      <dc:date>2016-03-22T15:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis : 2 conditions on same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-2-conditions-on-same-field/m-p/1047212#M638191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I am wondering what is the difference between the two following syntaxes:&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date = {"&amp;gt;=$(v_Today)"}*{"&amp;lt;=$(v_variable)"}&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Date = {"&amp;gt;=$(v_Today) &amp;lt;=$(v_variable)"}&lt;/SPAN&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;They're functionally the same. The intersection of two sets in the first is an AND and so is the second syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;But this doesn't, it behaves like a "OR":&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;FormattedMonth = {"&amp;gt;=$(=min(START_DATE)) &amp;lt;=$(=max(END_DATE))"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's not an OR, it simply does not work at all and thus creates a set of all records. Why it doesn't work? Probably because the date formats of FormattedMonth, START_DATE and END_DATE differ. I consider this behavior a bug personally.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 15:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-2-conditions-on-same-field/m-p/1047212#M638191</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-22T15:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis : 2 conditions on same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-2-conditions-on-same-field/m-p/1047213#M638193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you must be right about it simply not working at all &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I'm surprised though if it's a formatting issue, because it works with the * in between. Thank you Gysbert for your clarification.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 08:12:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-2-conditions-on-same-field/m-p/1047213#M638193</guid>
      <dc:creator>emmanueld</dc:creator>
      <dc:date>2016-03-23T08:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis : 2 conditions on same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-2-conditions-on-same-field/m-p/1047214#M638195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that's why I consider it a bug. Comparisons using &amp;gt;, &amp;gt;=, &amp;lt; and &amp;lt;= should always use the numeric values. Formatting of the dual value shouldn't make a difference imho.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 09:31:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-2-conditions-on-same-field/m-p/1047214#M638195</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-23T09:31:24Z</dc:date>
    </item>
  </channel>
</rss>

