<?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 Set analysis using only in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-only/m-p/198256#M57622</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Honestly I've never really fully understood the point of the only function except in some rare cases so I could be wrong here, but I don't understand why you are using only here. It looks like using STOPDATE={"&amp;gt;=(=ONLY(DATE_START))"} would be the same as STOPDATE={"&amp;gt;=DATE_START"} which I don't think would work anyway for several reasons. Your question is a little vague and I'm not sure I really follow but I think your first problem is that set analysis is calculated once per chart, not once per row. Looking at your post I can't really be sure that you need the set analysis to calculate into a different result for each row but I'm assuming you do unless you actually only want one start date for the entire chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming that is your problem you probably need to be something tricky with the aggr function. Something like....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count(distinct&lt;BR /&gt; aggr(&lt;BR /&gt; if([STOPDATE]&amp;gt;=[DATE_START] And [STARTDATE]&amp;lt;=[DATE_STOP]&lt;BR /&gt; [ID]&lt;BR /&gt; )&lt;BR /&gt; ,[ID],[DATE_START],[DATE_STOP],[STARTDATE], [STOPDATE]&lt;BR /&gt; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't realize you had four different dates when I wrote the code above so to be honest I'm not sure if it is going to work or not off the top of my head... but it's probably worth a shot. Again I don't know if I fully understand the question but hopefully something I said was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2011 15:20:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-05T15:20:19Z</dc:date>
    <item>
      <title>Set analysis using only</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-only/m-p/198255#M57621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an expressioN as follows:&lt;/P&gt;&lt;H4&gt;count({$&amp;lt;stopdate={"&amp;gt;=$(=only(Date_start))"},startdate={"&amp;lt;=$(=only(Date_stop))"}&amp;gt;}ID)&lt;/H4&gt;&lt;H4&gt;the problem is if I choose both Date_start and Date_stop for example 2011-03-21 I only recieve the posts that have startdate up to 2011-03-20, i should even get the result there startdate is 2011-03-21 but I don't get that result&lt;/H4&gt;&lt;H4&gt;Any ideas what can be wrong?&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 14:10:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-only/m-p/198255#M57621</guid>
      <dc:creator />
      <dc:date>2011-04-05T14:10:46Z</dc:date>
    </item>
    <item>
      <title>Set analysis using only</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-only/m-p/198256#M57622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Honestly I've never really fully understood the point of the only function except in some rare cases so I could be wrong here, but I don't understand why you are using only here. It looks like using STOPDATE={"&amp;gt;=(=ONLY(DATE_START))"} would be the same as STOPDATE={"&amp;gt;=DATE_START"} which I don't think would work anyway for several reasons. Your question is a little vague and I'm not sure I really follow but I think your first problem is that set analysis is calculated once per chart, not once per row. Looking at your post I can't really be sure that you need the set analysis to calculate into a different result for each row but I'm assuming you do unless you actually only want one start date for the entire chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming that is your problem you probably need to be something tricky with the aggr function. Something like....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count(distinct&lt;BR /&gt; aggr(&lt;BR /&gt; if([STOPDATE]&amp;gt;=[DATE_START] And [STARTDATE]&amp;lt;=[DATE_STOP]&lt;BR /&gt; [ID]&lt;BR /&gt; )&lt;BR /&gt; ,[ID],[DATE_START],[DATE_STOP],[STARTDATE], [STOPDATE]&lt;BR /&gt; )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't realize you had four different dates when I wrote the code above so to be honest I'm not sure if it is going to work or not off the top of my head... but it's probably worth a shot. Again I don't know if I fully understand the question but hopefully something I said was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 15:20:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-only/m-p/198256#M57622</guid>
      <dc:creator />
      <dc:date>2011-04-05T15:20:19Z</dc:date>
    </item>
    <item>
      <title>Set analysis using only</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-only/m-p/198257#M57623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use only- function for choose selected value from both date_stop and date_start&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 10:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-only/m-p/198257#M57623</guid>
      <dc:creator />
      <dc:date>2011-04-07T10:13:25Z</dc:date>
    </item>
  </channel>
</rss>

