<?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 syntax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852024#M1003473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like my chart to include information between dates specified by 2 variables but only before another date specified by another variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have from and to dates specified by the user in an input box (vFromDate and vToDate).&amp;nbsp; I also have another variable which is loaded called vProvDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If vProvDate is 23/05/15 and the From and To dates are 02/05/15 and 30/05/15 then I want to include data from 02/05/15 to 23/5/15&lt;/P&gt;&lt;P&gt;If vProvDate is 23/05/15 and the From and To dates are 02/05/15 and 16/05/15 then I want to include data from 02/05/15 to 16/5/15&lt;/P&gt;&lt;P&gt;If vProvDate is 23/05/15 and the From and To dates are 30/05/15 and 13/06/15 then I don't want to include any data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;= vFromDate &amp;lt;=vToDate but also &amp;lt;=vProvDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this in set analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 14:50:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-05-26T14:50:08Z</dc:date>
    <item>
      <title>Set Analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852024#M1003473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like my chart to include information between dates specified by 2 variables but only before another date specified by another variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have from and to dates specified by the user in an input box (vFromDate and vToDate).&amp;nbsp; I also have another variable which is loaded called vProvDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If vProvDate is 23/05/15 and the From and To dates are 02/05/15 and 30/05/15 then I want to include data from 02/05/15 to 23/5/15&lt;/P&gt;&lt;P&gt;If vProvDate is 23/05/15 and the From and To dates are 02/05/15 and 16/05/15 then I want to include data from 02/05/15 to 16/5/15&lt;/P&gt;&lt;P&gt;If vProvDate is 23/05/15 and the From and To dates are 30/05/15 and 13/06/15 then I don't want to include any data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;= vFromDate &amp;lt;=vToDate but also &amp;lt;=vProvDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this in set analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 14:50:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852024#M1003473</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-26T14:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852025#M1003474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will give you what you are looking for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;PostingCalendarDate={"&amp;gt;=$(fromDate)&amp;lt;=$(toDate)"}&amp;gt;*&amp;lt;PostingCalendarDate={"&amp;lt;=$(proDate)"}&amp;gt;} AMOUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Set Analysis above will first look for transactions between your from and to dates and then intersect that with transactions less than the proDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:02:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852025#M1003474</guid>
      <dc:creator>markmccoid</dc:creator>
      <dc:date>2015-05-26T15:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852026#M1003475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would create another variable e.g. vToDefDate where you use your conditions to select the correct enddate, then use this variable in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vToDefDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=if(vProvDate&amp;lt;vToDate,vProvDate,vToDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date={"&amp;gt;=$(=Date(vFromDate))&amp;lt;=$(=Date(vToDefDate))"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See example attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:04:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852026#M1003475</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2015-05-26T15:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852027#M1003476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you will need another variable to check which date should be the final To date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vToDateFinal: =if(vProvDate &amp;gt; vToDate, vToDate, vProvDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then you can use a set analysis expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date={'=&amp;gt;$(vFromDate)&amp;lt;=$(vToDateFinal)'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cesar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852027#M1003476</guid>
      <dc:creator>cesaraccardi</dc:creator>
      <dc:date>2015-05-26T15:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852028#M1003477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Piet was quicker than me to reply &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; we are basically proposing the same solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:24:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-syntax/m-p/852028#M1003477</guid>
      <dc:creator>cesaraccardi</dc:creator>
      <dc:date>2015-05-26T15:24:02Z</dc:date>
    </item>
  </channel>
</rss>

