<?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: How to achieve this set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-achieve-this-set-analysis/m-p/435864#M162591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your expression is telling something like "search all StartDate '&amp;gt;TestDate' and Select them".&lt;/P&gt;&lt;P&gt;You've got some issues here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) TestDate is not evaluated as expression in this case, so you compare StartDate values with the literal 'TestDate'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) Even if you could could compare StartDate with the corresponding TestDate, what should be selected if you woudl have another record, &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;4,'2012/01/01','2012/01/01'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer, if StartDate Jan 1st should be selected would be ambiguous, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, whenever you want to do record based comparisons, you should select in a field that has a unique value per record. In your example, I assume field Id shows unique values per record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The equal sign is now telling QV to evaluate StartDate&amp;gt;TestDate (in the context of each Id). This results in a logical value, all true values will trigger the selection of current Id value (like "search all Id values where StartDate &amp;gt; TestDate and select these Id").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 21 Oct 2012 22:13:42 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-10-21T22:13:42Z</dc:date>
    <item>
      <title>How to achieve this set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-achieve-this-set-analysis/m-p/435861#M162588</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;I have the following records:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load * Inline&lt;/P&gt;&lt;P&gt;[Id, TestDate,StartDate&lt;/P&gt;&lt;P&gt;1,'2012/01/01','2012/01/05'&lt;/P&gt;&lt;P&gt;2,'2012/01/02','2012/01/03'&lt;/P&gt;&lt;P&gt;3,'2012/01/03','2012/01/01'&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use pivot table to show the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TestDate as the dimension, and use set analysis to show how many records whose StartDate is greater than TestDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this expression, count({&amp;lt;StartDate={'&amp;gt;TestDate'}&amp;gt;}Id), but it does not work, how to figure it out?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2012 14:24:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-achieve-this-set-analysis/m-p/435861#M162588</guid>
      <dc:creator />
      <dc:date>2012-10-20T14:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve this set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-achieve-this-set-analysis/m-p/435862#M162589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want to compare StartDate &amp;gt; TestDate record wise (per Id), right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So maybe&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=count({&amp;lt;Id= {"=StartDate&amp;gt;TestDate"}&amp;gt;} Id)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2012 14:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-achieve-this-set-analysis/m-p/435862#M162589</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-20T14:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve this set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-achieve-this-set-analysis/m-p/435863#M162590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works now. Just out of curiosity, why the expression I provided does not work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And why need one equal sign in your expression, I mean the equal sign before "StartDate", &lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"&lt;/EM&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;EM&gt;StartDate&amp;gt;TestDate"}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you please help me out again?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2012 14:56:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-achieve-this-set-analysis/m-p/435863#M162590</guid>
      <dc:creator />
      <dc:date>2012-10-20T14:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve this set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-achieve-this-set-analysis/m-p/435864#M162591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your expression is telling something like "search all StartDate '&amp;gt;TestDate' and Select them".&lt;/P&gt;&lt;P&gt;You've got some issues here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) TestDate is not evaluated as expression in this case, so you compare StartDate values with the literal 'TestDate'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) Even if you could could compare StartDate with the corresponding TestDate, what should be selected if you woudl have another record, &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;4,'2012/01/01','2012/01/01'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer, if StartDate Jan 1st should be selected would be ambiguous, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, whenever you want to do record based comparisons, you should select in a field that has a unique value per record. In your example, I assume field Id shows unique values per record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The equal sign is now telling QV to evaluate StartDate&amp;gt;TestDate (in the context of each Id). This results in a logical value, all true values will trigger the selection of current Id value (like "search all Id values where StartDate &amp;gt; TestDate and select these Id").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 22:13:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-achieve-this-set-analysis/m-p/435864#M162591</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-21T22:13:42Z</dc:date>
    </item>
  </channel>
</rss>

